Class LoggerImpl
java.lang.Object
com.biglybt.pifimpl.local.logging.LoggerImpl
- All Implemented Interfaces:
Logger
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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) getChannel
(String name) Create a normal logging channel.Retrieve all the channels that have been created for all plugins.getNullChannel
(String name) Create a logger channel that doesn't output to the standard AZ log.Retrieve the PluginInterfacegetTimeStampedChannel
(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)
-
Field Details
-
pi
-
channels
-
alert_listeners_map
-
alert_listeners_map2
-
-
Constructor Details
-
LoggerImpl
-
-
Method Details
-
getPluginInterface
Description copied from interface:Logger
Retrieve the PluginInterface- Specified by:
getPluginInterface
in interfaceLogger
- Returns:
- PluginInterface object
-
getChannel
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 interfaceLogger
- Parameters:
name
- Name of LoggerChannel- Returns:
- a new LoggerChannel
-
getTimeStampedChannel
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 interfaceLogger
- Parameters:
name
- Name of LoggerChannel- Returns:
- a new LoggerChannel
-
getNullChannel
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 interfaceLogger
- Parameters:
name
- Name of LoggerChannel- Returns:
- a new LoggerChannel
-
getChannels
Description copied from interface:Logger
Retrieve all the channels that have been created for all plugins.- Specified by:
getChannels
in interfaceLogger
- Returns:
- Array of LoggerChannel objects
-
addAlertListener
Description copied from interface:Logger
Add LoggerAlertListener for all alerts raised. It might be a better idea to useLogger.addAlertListener(LogAlertListener)
, as it is more flexible.- Specified by:
addAlertListener
in interfaceLogger
- Parameters:
listener
- Listener to add- See Also:
-
removeAlertListener
Description copied from interface:Logger
Remove previously added AlertListener.- Specified by:
removeAlertListener
in interfaceLogger
- Parameters:
listener
- LoggerAlertListener to remove
-
addAlertListener
Description copied from interface:Logger
Add a listener to be informed of any alerts to be displayed to users.- Specified by:
addAlertListener
in interfaceLogger
-
removeAlertListener
Description copied from interface:Logger
Remove a previously added alert listener.- Specified by:
removeAlertListener
in interfaceLogger
-
addFileLoggingListener
- Specified by:
addFileLoggingListener
in interfaceLogger
-
removeFileLoggingListener
- Specified by:
removeFileLoggingListener
in interfaceLogger
-