Class LoggerImpl

java.lang.Object
com.biglybt.pifimpl.local.logging.LoggerImpl
All Implemented Interfaces:
Logger

public class LoggerImpl extends Object implements Logger
  • Field Details

    • pi

      private PluginInterface pi
    • channels

      private List channels
    • alert_listeners_map

      private Map alert_listeners_map
    • alert_listeners_map2

      private Map alert_listeners_map2
  • Constructor Details

  • Method Details

    • getPluginInterface

      public PluginInterface getPluginInterface()
      Description copied from interface: Logger
      Retrieve the PluginInterface
      Specified by:
      getPluginInterface in interface Logger
      Returns:
      PluginInterface object
    • getChannel

      public LoggerChannel getChannel(String name)
      Description copied from interface: Logger
      Create a normal logging channel. Multiple calls to this method with the same name parameter results in different channels.
      Specified by:
      getChannel in interface Logger
      Parameters:
      name - Name of LoggerChannel
      Returns:
      a new LoggerChannel
    • getTimeStampedChannel

      public LoggerChannel getTimeStampedChannel(String name)
      Description copied from interface: Logger
      Create a timestamped logging channel. Multiple calls to this method with the same name parameter results in different channels.
      Specified by:
      getTimeStampedChannel in interface Logger
      Parameters:
      name - Name of LoggerChannel
      Returns:
      a new LoggerChannel
    • getNullChannel

      public LoggerChannel getNullChannel(String name)
      Description copied from interface: Logger
      Create a logger channel that doesn't output to the standard AZ log. Add listeners to it if output needs to be routed somewhere. Multiple calls to this method with the same name parameter results in different channels
      Specified by:
      getNullChannel in interface Logger
      Parameters:
      name - Name of LoggerChannel
      Returns:
      a new LoggerChannel
    • getChannels

      public LoggerChannel[] getChannels()
      Description copied from interface: Logger
      Retrieve all the channels that have been created for all plugins.
      Specified by:
      getChannels in interface Logger
      Returns:
      Array of LoggerChannel objects
    • addAlertListener

      public void addAlertListener(LoggerAlertListener listener)
      Description copied from interface: Logger
      Add LoggerAlertListener for all alerts raised. It might be a better idea to use Logger.addAlertListener(LogAlertListener), as it is more flexible.
      Specified by:
      addAlertListener in interface Logger
      Parameters:
      listener - Listener to add
      See Also:
    • removeAlertListener

      public void removeAlertListener(LoggerAlertListener listener)
      Description copied from interface: Logger
      Remove previously added AlertListener.
      Specified by:
      removeAlertListener in interface Logger
      Parameters:
      listener - LoggerAlertListener to remove
    • addAlertListener

      public void addAlertListener(LogAlertListener listener)
      Description copied from interface: Logger
      Add a listener to be informed of any alerts to be displayed to users.
      Specified by:
      addAlertListener in interface Logger
    • removeAlertListener

      public void removeAlertListener(LogAlertListener listener)
      Description copied from interface: Logger
      Remove a previously added alert listener.
      Specified by:
      removeAlertListener in interface Logger
    • addFileLoggingListener

      public void addFileLoggingListener(FileLoggerAdapter listener)
      Specified by:
      addFileLoggingListener in interface Logger
    • removeFileLoggingListener

      public void removeFileLoggingListener(FileLoggerAdapter listener)
      Specified by:
      removeFileLoggingListener in interface Logger