Package nl.uu.cs.aplib
Class Logging
java.lang.Object
nl.uu.cs.aplib.Logging
Define aplib logging. Use
getAPLIBlogger()
to get aplib's logger.
This is a single logger accessible from anywhere. Use
setLoggingLevel(Level)
to globally set the logging level of this
logger. Use e.g. addSystemErrAsLogHandler()
or
attachFileAsLogHandler(String)
to attach listeners to this logger.
Messages sent to the logger will be echoed to its listerners.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
AttachSystem.err
to listen to this agent's logger (also called log-handler).static void
attachFileAsLogHandler(String filename)
Attach a file specified by the filename to receive messages sent to aplib's logger (in Logging jargon, the file becomes a log handler).static void
Remove all current handlers of the aplib logger.static Logger
Get the logger instance used by aplib.static void
setLoggingLevel(Level level)
To set the the logging level of aplib logger.
-
Field Details
-
APLIBLOGGER
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Logging
Logging()
-
-
Method Details
-
getAPLIBlogger
Get the logger instance used by aplib. -
addSystemErrAsLogHandler
public static void addSystemErrAsLogHandler()AttachSystem.err
to listen to this agent's logger (also called log-handler). -
clearLoggers
public static void clearLoggers()Remove all current handlers of the aplib logger. -
attachFileAsLogHandler
Attach a file specified by the filename to receive messages sent to aplib's logger (in Logging jargon, the file becomes a log handler). The filename can include a path to the file. -
setLoggingLevel
To set the the logging level of aplib logger. Logging messages of lower level will then be ignored.
-