Module hw06

Interface ILoggerControl


public interface ILoggerControl
Author:
swong
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static ILogger
    Return a singleton shared ILogger instance.
    static ILogger
    Instantiate a new instance of an ILogger with the ILogEntryProcessor.DEFAULT log entry processor and a minimum logging level of LogLevel.INFO.
    static ILogger
    Instantiate a new instance of an ILogger with the given log entry processor and a minimum logging level of LogLevel.INFO.
    static ILogger
    makeLogger​(ILogEntryProcessor logProcFn, LogLevel logLevel)
    Instantiate a new instance of an ILogger with the given log entry processor and the given minimum logging level.
    static ILogger
    makeLogger​(LogLevel level)
    Instantiate a new instance of an ILogger with the ILogEntryProcessor.DEFAULT log entry processor and the given minimum logging level.
  • Method Details

    • makeLogger

      static ILogger makeLogger()
      Instantiate a new instance of an ILogger with the ILogEntryProcessor.DEFAULT log entry processor and a minimum logging level of LogLevel.INFO.
      Returns:
      A new ILogger instance
    • makeLogger

      static ILogger makeLogger(LogLevel level)
      Instantiate a new instance of an ILogger with the ILogEntryProcessor.DEFAULT log entry processor and the given minimum logging level.
      Parameters:
      level - The minimum log level to use
      Returns:
      A new ILogger instance
    • makeLogger

      static ILogger makeLogger(ILogEntryProcessor logProcFn)
      Instantiate a new instance of an ILogger with the given log entry processor and a minimum logging level of LogLevel.INFO.
      Parameters:
      logProcFn - The log entry processor to use
      Returns:
      A new ILogger instance
    • makeLogger

      static ILogger makeLogger(ILogEntryProcessor logProcFn, LogLevel logLevel)
      Instantiate a new instance of an ILogger with the given log entry processor and the given minimum logging level.
      Parameters:
      logProcFn - The log entry processor to use
      logLevel - The minimum log level to use
      Returns:
      A new ILogger instance
    • getSharedLogger

      static ILogger getSharedLogger()
      Return a singleton shared ILogger instance. Repeated calls to this static method will return a reference to the same ILogger instance. The shared ILogger instance is typically used for implementing a single common logger across decoupled parts of an entire system. This singleton shared instance is NOT useful for when multiple, separate shared loggers are required.
      Returns:
      The shared ILogger instance