Class Logger

java.lang.Object
com.netscape.cms.logging.Logger
All Implemented Interfaces:
ILogger
Direct Known Subclasses:
SignedAuditLogger

public class Logger extends Object implements ILogger
A class represents certificate server logger implementation.

Version:
$Revision$, $Date$
Author:
thomask, mzhao
  • Field Details

  • Constructor Details

  • Method Details

    • getLogger

      public static Logger getLogger(LogCategory category, LogSource source)
    • register

      public static void register(LogCategory evtClass, LogEventFactory f)
      Registers log factory.
      Parameters:
      evtClass - the event class name: ILogger.EV_SYSTEM or ILogger.EV_AUDIT
      f - the event factory name
    • log

      public void log(String msg)
    • log

      public void log(LogEvent event)
    • log

      public void log(LogCategory evtClass, LogSource source, String msg)
      Logs an event using default log level.
      Specified by:
      log in interface ILogger
      Parameters:
      evtClass - What kind of event it is: EV_AUDIT or EV_SYSTEM.
      source - the source of the log event
      msg - the one line detail message to be logged
    • log

      public void log(int level, String msg)
    • log

      public void log(LogCategory evtClass, LogSource source, int level, String msg)
      Logs an event to the log queue.
      Specified by:
      log in interface ILogger
      Parameters:
      evtClass - What kind of event it is: EV_AUDIT or EV_SYSTEM.
      source - the source of the log event
      level - the level of the log event
      msg - the one line detail message to be logged
    • log

      public void log(LogCategory evtClass, LogSource source, int level, String msg, Object param)
      Logs an event to the log queue.
      Specified by:
      log in interface ILogger
      Parameters:
      evtClass - What kind of event it is: EV_AUDIT or EV_SYSTEM.
      source - the source of the log event
      msg - the one line detail message to be logged
      param - the parameter in the detail message
      level - The level of the log event.
    • log

      public void log(int level, String msg, Object[] params)
    • log

      public void log(LogCategory evtClass, LogSource source, int level, String msg, Object[] params)
      Logs an event to the log queue.
      Specified by:
      log in interface ILogger
      Parameters:
      evtClass - What kind of event it is: EV_AUDIT or EV_SYSTEM.
      source - the source of the log event
      level - the level of the log event
      msg - the one line detail message to be logged
      params - the parameters in the detail message
    • log

      public void log(LogCategory evtClass, LogSource source, String msg, boolean multiline)
      Logs an event using default log level.
      Specified by:
      log in interface ILogger
      Parameters:
      evtClass - What kind of event it is: EV_AUDIT or EV_SYSTEM.
      source - the source of the log event
      msg - the one line detail message to be logged
      multiline - true if the message has more than one line, otherwise false
    • log

      public void log(int level, String msg, boolean multiline)
    • log

      public void log(LogCategory evtClass, LogSource source, int level, String msg, boolean multiline)
      Logs an event to the log queue.
      Specified by:
      log in interface ILogger
      Parameters:
      evtClass - What kind of event it is: EV_AUDIT or EV_SYSTEM.
      source - the source of the log event
      level - the level of the log event
      msg - the one line detail message to be logged
      multiline - true if the message has more than one line, otherwise false
    • log

      public void log(LogCategory evtClass, LogSource source, int level, String msg, Object param, boolean multiline)
      Logs an event to the log queue.
      Specified by:
      log in interface ILogger
      Parameters:
      evtClass - What kind of event it is: EV_AUDIT or EV_SYSTEM.
      source - the source of the log event
      msg - the one line detail message to be logged
      param - the parameter in the detail message
      multiline - true if the message has more than one line, otherwise false
      level - The level of the log event.
    • log

      public void log(int level, String msg, Object[] params, boolean multiline)
    • log

      public void log(LogCategory evtClass, LogSource source, int level, String msg, Object[] params, boolean multiline)
      Logs an event to the log queue.
      Parameters:
      evtClass - What kind of event it is: EV_AUDIT or EV_SYSTEM.
      source - the source of the log event
      level - the level of the log event
      msg - the one line detail message to be logged
      params - the parameters in the detail message
      multiline - true if the message has more than one line, otherwise false
    • create

      public LogEvent create(int level, String msg, Object[] params, boolean multiline)
    • create

      public LogEvent create(LogCategory evtClass, LogSource source, int level, String msg, Object[] params, boolean multiline)
      Creates generic log event. If required, we can recycle events here.
      Specified by:
      create in interface ILogger
    • update

      public void update(LogEvent event, LogSource source, int level, String message, Object[] params, boolean multiline)
      Updates a log event.
      Parameters:
      event - The event to be updated.
      source - The subsystem who creates the log event.
      level - The severity of the log event.
      message - The detail message of the log.
      params - The parameters in the detail log message.
      multiline - The log message has more than one line or not.
    • release

      public void release(LogEvent event)
      Notifies logger to reuse the event. This framework opens up possibility to reuse event.
      Parameters:
      event - a log event