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,StringFavorites,StringFavorites.StringFavorite,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 Loggerm_Loggerthe logger in use.protected Booleanm_LoggingIsEnabledwhether logging is enabled.protected LoggingLevelm_LoggingLevelthe 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 voidconfigureLogger()Initializes the logger.LoggergetLogger()Returns the logger in use.LoggingLevelgetLoggingLevel()Returns the logging level.protected voidinitializeLogging()Pre-configures the logging.booleanisLoggingEnabled()Returns whether logging is enabled.intsizeOf()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:
getLoggerin 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:
isLoggingEnabledin interfaceLoggingSupporter- Returns:
- true if at least
Level.INFO
-
sizeOf
public int sizeOf()
Returns the size of the object.- Specified by:
sizeOfin interfaceSizeOfHandler- Returns:
- the size of the object
-
-