Package adams.core.logging
Class LoggingObject
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- All Implemented Interfaces:
LoggingSupporter
,SizeOfHandler
,Serializable
- Direct Known Subclasses:
AbstractAxisModel
,AbstractCommandLineHandler
,AbstractCommandProcessor
,AbstractDatabaseConnection
,AbstractDataContainer
,AbstractDataStatistic
,AbstractDirector
,AbstractEditPostProcessor
,AbstractEnvironment
,AbstractEvaluation
,AbstractFlowEditorMenuItem
,AbstractGenericObjectEditorPopupMenuCustomizer
,AbstractHistory
,AbstractLookAndFeel
,AbstractMultiPageMenuItem
,AbstractObjectRenderer
,AbstractOptionConsumer
,AbstractOptionProducer
,AbstractParserFunction
,AbstractParserProcedure
,AbstractRecentItemsHandler
,AbstractResultItem
,AbstractScriptingEngine
,AbstractScriptlet
,AbstractSendToAction
,AbstractSimpleOptionParser
,AbstractTableFacade
,AbstractToolPlugin
,AbstractWrapper
,AggregateEvaluations
,ApplicationMenu
,CallableActorHelper
,CallableNamesRecorder
,Capabilities
,Conditions
,ContentHandlerFavorites
,ContentHandlerFavorites.ContentHandlerFavorite
,CustomLoggingLevelObject
,DatasetInfo
,Drivers
,Email
,EventHelper
,Favorites
,Favorites.Favorite
,FilenameProposer
,FindClass
,Groovy
,GUIPrompt
,IndexedSplit
,IndexedSplitsRun
,Javadoc
,JenericCmdline
,NewInstance
,PackDataDef
,ParserHelper
,PauseStateManager
,Placeholders
,PublishSubscribeHandler
,Reader
,Report
,RunnableWithLogging
,RunningFlowsRegistry
,RunScheme
,Sequences
,SplitIndices
,SQL
,StorageQueueHandler
,Variables
,WekaClassificationModel
,WekaClusteringModel
,WekaRegressionModel
,Writer
public class LoggingObject extends Object implements Serializable, SizeOfHandler, LoggingSupporter
A basic object with logging support.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Logger
m_Logger
the logger in use.protected Boolean
m_LoggingIsEnabled
whether logging is enabled.protected LoggingLevel
m_LoggingLevel
the logging level.
-
Constructor Summary
Constructors Constructor Description LoggingObject()
Initializes the object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureLogger()
Initializes the logger.Logger
getLogger()
Returns the logger in use.LoggingLevel
getLoggingLevel()
Returns the logging level.protected void
initializeLogging()
Pre-configures the logging.boolean
isLoggingEnabled()
Returns whether logging is enabled.int
sizeOf()
Returns the size of the object.
-
-
-
Field Detail
-
m_LoggingLevel
protected LoggingLevel m_LoggingLevel
the logging level.
-
m_Logger
protected transient Logger m_Logger
the logger in use.
-
m_LoggingIsEnabled
protected transient Boolean m_LoggingIsEnabled
whether logging is enabled.
-
-
Method Detail
-
initializeLogging
protected void initializeLogging()
Pre-configures the logging.
-
configureLogger
protected void configureLogger()
Initializes the logger.
Default implementation uses the class name.
-
getLogger
public Logger getLogger()
Returns the logger in use.- Specified by:
getLogger
in interfaceLoggingSupporter
- Returns:
- the logger
-
getLoggingLevel
public LoggingLevel getLoggingLevel()
Returns the logging level.- Returns:
- the level
-
isLoggingEnabled
public boolean isLoggingEnabled()
Returns whether logging is enabled.- Specified by:
isLoggingEnabled
in interfaceLoggingSupporter
- Returns:
- true if at least
Level.INFO
-
sizeOf
public int sizeOf()
Returns the size of the object.- Specified by:
sizeOf
in interfaceSizeOfHandler
- Returns:
- the size of the object
-
-