Package eu.woolplatform.utils.log
Class DefaultLogDelegate
- java.lang.Object
-
- eu.woolplatform.utils.log.AbstractLogDelegate
-
- eu.woolplatform.utils.log.DefaultLogDelegate
-
- All Implemented Interfaces:
LogDelegate
public class DefaultLogDelegate extends AbstractLogDelegate
This class writes log messages to standard output or standard error. Messages with log levelWARNor higher will be written to standard error. Other messages will be written to standard output.For more information see
LoggerandAbstractLogDelegate.
-
-
Field Summary
-
Fields inherited from class eu.woolplatform.utils.log.AbstractLogDelegate
ERROR_BASE, ERROR_WRITE_FILE
-
-
Constructor Summary
Constructors Constructor Description DefaultLogDelegate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intprintTaggedMessage(int priority, String tag, String msg)Writes a log message.-
Methods inherited from class eu.woolplatform.utils.log.AbstractLogDelegate
d, d, e, e, getDefaultStdErr, getDefaultStdOut, getFileLogger, getStackTraceString, i, i, isLoggable, println, setCaptureStdErr, setCaptureStdOut, setFileLogger, setLogLevel, setLogLevel, setLogLevels, setLogLevels, v, v, w, w, w, wtf, wtf, wtf
-
-
-
-
Method Detail
-
printTaggedMessage
public int printTaggedMessage(int priority, String tag, String msg)Description copied from class:AbstractLogDelegateWrites a log message. Every line in the message text has already been tagged with the log level, message tag (identifier of the source of the log message) and the current date and time. Every line ends with a new line character, including the last line.This method is only called if
isLoggable()returns true. It's called inside a lock, so it's thread safe.For returned error codes, a subclass may define its own error codes based on
ERROR_BASE.- Specified by:
printTaggedMessagein classAbstractLogDelegate- Parameters:
priority- the log leveltag- the message tagmsg- the tagged message- Returns:
- 0 if no error occurred, an error code otherwise.
-
-