Class AdapterLogRecord

  • All Implemented Interfaces:
    java.io.Serializable

    public class AdapterLogRecord
    extends LogRecord

    A LogRecord to be used with the LogMonitorAdapter

    See Also:
    Serialized Form
    • Field Detail

      • severeLevel

        private static LogLevel severeLevel
      • sw

        private static java.io.StringWriter sw
      • pw

        private static java.io.PrintWriter pw
    • Constructor Detail

      • AdapterLogRecord

        public AdapterLogRecord()
    • Method Detail

      • setCategory

        public void setCategory​(java.lang.String category)
        Description copied from class: LogRecord
        Set the category associated with this LogRecord. A category represents a hierarchical dot (".") separated namespace for messages. The definition of a category is application specific, but a common convention is as follows:

        When logging messages for a particluar class you can use its class name: com.thoughtworks.framework.servlet.ServletServiceBroker.

        Futhermore, to log a message for a particular method in a class add the method name: com.thoughtworks.framework.servlet.ServletServiceBroker.init().

        Overrides:
        setCategory in class LogRecord
        Parameters:
        category - The category for this record.
        See Also:
        LogRecord.getCategory()
      • isSevereLevel

        public boolean isSevereLevel()
        Description copied from class: LogRecord
        Abstract method. Must be overridden to indicate what log level to show in red.
        Specified by:
        isSevereLevel in class LogRecord
      • setSevereLevel

        public static void setSevereLevel​(LogLevel level)
      • getSevereLevel

        public static LogLevel getSevereLevel()
      • getLocationInfo

        protected java.lang.String getLocationInfo​(java.lang.String category)
      • stackTraceToString

        protected java.lang.String stackTraceToString​(java.lang.Throwable t)
      • parseLine

        protected java.lang.String parseLine​(java.lang.String trace,
                                             java.lang.String category)