View Javadoc

    1   /***
    2    * JFoxSOAF, Service-Oriented Application Framework
    3    *
    4    * Copyright (C) www.huihoo.org
    5    *
    6    * Distributable under GNU LGPL
    7    *
    8    * For more information, please visit: http://www.huihoo.org/jfox/jfoxsoaf
    9    */
    10
    11  package org.huihoo.jfox.soaf.services.logging;
    12
    13  import org.apache.commons.logging.Log;
    14  import org.apache.commons.logging.LogFactory;
    15
    16  /***
    17   * <p>
    18   * LoggingService Implemenation.
    19   * </p>
    20   *
    21   * @author <a href="mailto:founder_chen@yahoo.com.cn">Peter Cheng</a>
    22   * @version $Revision: 1.3 $ $Date: 2004/10/13 11:00:54 $
    23   * @since 1.0
    24   */
    25
    26  public class LoggingServiceImpl implements LoggingService {
    27
    28      private final Log logger = LogFactory.getLog(getClass());
    29
    30      /***
    31       * @see com.neusoft.jaf.services.logging.LogService#isDebugEnabled()
    32       */
    33      public boolean isDebugEnabled() {
    34          return logger.isDebugEnabled();
    35      }
    36
    37      /***
    38       * @see com.neusoft.jaf.services.logging.LogService#isErrorEnabled()
    39       */
    40      public boolean isErrorEnabled() {
    41          return logger.isErrorEnabled();
    42      }
    43
    44      /***
    45       * @see com.neusoft.jaf.services.logging.LogService#isFatalEnabled()
    46       */
    47      public boolean isFatalEnabled() {
    48          return logger.isFatalEnabled();
    49      }
    50
    51      /***
    52       * @see com.neusoft.jaf.services.logging.LogService#isInfoEnabled()
    53       */
    54      public boolean isInfoEnabled() {
    55          return logger.isInfoEnabled();
    56      }
    57
    58      /***
    59       * @see com.neusoft.jaf.services.logging.LogService#isTraceEnabled()
    60       */
    61      public boolean isTraceEnabled() {
    62          return logger.isTraceEnabled();
    63      }
    64
    65      /***
    66       * @see com.neusoft.jaf.services.logging.LogService#isWarnEnabled()
    67       */
    68      public boolean isWarnEnabled() {
    69          return logger.isWarnEnabled();
    70      }
    71
    72      /***
    73       * @see com.neusoft.jaf.services.logging.LogService#trace(Object message)
    74       */
    75      public void trace(Object message) {
    76          logger.trace(message);
    77      }
    78
    79      /***
    80       * @see com.neusoft.jaf.services.logging.LogService#trace(Object message,
    81       *      Throwable t)
    82       */
    83      public void trace(Object message, Throwable t) {
    84          logger.trace(message, t);
    85      }
    86
    87      /***
    88       * @see com.neusoft.jaf.services.logging.LogService#debug(Object message)
    89       */
    90      public void debug(Object message) {
    91          logger.debug(message);
    92      }
    93
    94      /***
    95       * @see com.neusoft.jaf.services.logging.LogService#debug(Object message,
    96       *      Throwable t)
    97       */
    98      public void debug(Object message, Throwable t) {
    99          logger.debug(message, t);
    100     }
    101
    102     /***
    103      * @see com.neusoft.jaf.services.logging.LogService#info(Object message)
    104      */
    105     public void info(Object message) {
    106         logger.info(message);
    107     }
    108
    109     /***
    110      * @see com.neusoft.jaf.services.logging.LogService#info(Object message,
    111      *      Throwable t)
    112      */
    113     public void info(Object message, Throwable t) {
    114         logger.info(message, t);
    115     }
    116
    117     /***
    118      * @see com.neusoft.jaf.services.logging.LogService#info(Object message)
    119      */
    120     public void warn(Object message) {
    121         logger.warn(message);
    122     }
    123
    124     /***
    125      * @see com.neusoft.jaf.services.logging.LogService#info(Object message,
    126      *      Throwable t)
    127      */
    128     public void warn(Object message, Throwable t) {
    129         logger.warn(message, t);
    130     }
    131
    132     /***
    133      * @see com.neusoft.jaf.services.logging.LogService#error(Object message)
    134      */
    135     public void error(Object message) {
    136         logger.error(message);
    137     }
    138
    139     /***
    140      * @see com.neusoft.jaf.services.logging.LogService#error(Object message,
    141      *      Throwable t)
    142      */
    143     public void error(Object message, Throwable t) {
    144         logger.error(message, t);
    145     }
    146
    147     /***
    148      * @see com.neusoft.jaf.services.logging.LogService#fatal(Object message)
    149      */
    150     public void fatal(Object message) {
    151         logger.fatal(message);
    152     }
    153
    154     /***
    155      * @see com.neusoft.jaf.services.logging.LogService#fatal(Object message,
    156      *      Throwable t)
    157      */
    158     public void fatal(Object message, Throwable t) {
    159         logger.fatal(message, t);
    160     }
    161
    162 }