Class AdapterLogRecord

  • All Implemented Interfaces:
    Serializable

    public class AdapterLogRecord
    extends LogRecord

    A LogRecord to be used with the LogMonitorAdapter

    Author:
    Richard Hurst
    See Also:
    Serialized Form
    • Constructor Detail

      • AdapterLogRecord

        public AdapterLogRecord()
    • Method Detail

      • setCategory

        public void setCategory​(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 String getLocationInfo​(String category)
      • stackTraceToString

        protected String stackTraceToString​(Throwable t)