Class LogFactoryImpl.LogImpl

  • All Implemented Interfaces:
    Log
    Enclosing class:
    LogFactoryImpl

    public class LogFactoryImpl.LogImpl
    extends AbstractLog
    A simple implementation of the Log interface. Writes output to stderr.
    • Constructor Detail

      • LogImpl

        public LogImpl()
    • Method Detail

      • isEnabled

        protected boolean isEnabled​(short level)
        Description copied from class: AbstractLog
        Check to see if the specified logging level is enabled.
        Specified by:
        isEnabled in class AbstractLog
      • log

        protected void log​(short level,
                           java.lang.String message,
                           java.lang.Throwable t)
        Description copied from class: AbstractLog
        Send the specified log message to the handler.
        Specified by:
        log in class AbstractLog
        Parameters:
        level - the level of the log message
        message - the message to send
        t - the Throwable, or null if this is not an error
      • formatMessage

        protected java.lang.String formatMessage​(short level,
                                                 java.lang.String message,
                                                 java.lang.Throwable t)
        Convert message into a string ready to be written to the log.
        Parameters:
        t - may be null
      • setChannel

        public void setChannel​(java.lang.String val)
      • getChannel

        public java.lang.String getChannel()
      • setLevel

        public void setLevel​(short val)
      • getLevel

        public short getLevel()