org.gudy.azureus2.pluginsimpl.local.logging
Class LoggerImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.logging.LoggerImpl
All Implemented Interfaces:
Logger

public class LoggerImpl
extends Object
implements Logger


Constructor Summary
LoggerImpl(PluginInterface _pi)
           
 
Method Summary
 void addAlertListener(LogAlertListener listener)
          Add a listener to be informed of any alerts to be displayed to users.
 void addAlertListener(LoggerAlertListener listener)
          Add LoggerAlertListener for all alerts raised.
 void addFileLoggingListener(FileLoggerAdapter listener)
           
 LoggerChannel getChannel(String name)
          Create a normal logging channel.
 LoggerChannel[] getChannels()
          Retrieve all the channels that have been created for all plugins.
 LoggerChannel getNullChannel(String name)
          Create a logger channel that doesn't output to the standard AZ log.
 PluginInterface getPluginInterface()
          Retrieve the PluginInterface
 LoggerChannel getTimeStampedChannel(String name)
          Create a timestamped logging channel.
 void removeAlertListener(LogAlertListener listener)
          Remove a previously added alert listener.
 void removeAlertListener(LoggerAlertListener listener)
          Remove previously added AlertListener.
 void removeFileLoggingListener(FileLoggerAdapter listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerImpl

public LoggerImpl(PluginInterface _pi)
Method Detail

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:
Logger.addAlertListener(LogAlertListener)

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