-
public class StreamLogAPI for sending log output.
Generally, you should use the StreamLog.v, StreamLog.d, StreamLog.i, StreamLog.w, and StreamLog.e methods to write logs.
The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE.
-
-
Method Summary
Modifier and Type Method Description final UnitsetLogger(StreamLogger logger)Sets a StreamLogger implementation to be used. final UnitsetValidator(IsLoggableValidator validator)Sets a IsLoggableValidator implementation to be used. final TaggedLoggergetLogger(String tag)Returns a tagged logger. final Unite(String tag, Throwable throwable, Function0<String> message)Send a ERROR log message. final Unite(String tag, Function0<String> message)Send a ERROR log message. final Unitw(String tag, Function0<String> message)Send a WARN log message. final Uniti(String tag, Function0<String> message)Send a INFO log message. final Unitd(String tag, Function0<String> message)Send a DEBUG log message. final Unitv(String tag, Function0<String> message)Send a VERBOSE log message. -
-
Method Detail
-
setLogger
final Unit setLogger(StreamLogger logger)
Sets a StreamLogger implementation to be used.
-
setValidator
final Unit setValidator(IsLoggableValidator validator)
Sets a IsLoggableValidator implementation to be used.
-
getLogger
final TaggedLogger getLogger(String tag)
Returns a tagged logger.
-
e
final Unit e(String tag, Throwable throwable, Function0<String> message)
Send a ERROR log message.
- Parameters:
tag- Used to identify the source of a log message.throwable- An exception to log.message- The function returning a message you would like logged.
-
e
final Unit e(String tag, Function0<String> message)
Send a ERROR log message.
- Parameters:
tag- Used to identify the source of a log message.message- The function returning a message you would like logged.
-
w
final Unit w(String tag, Function0<String> message)
Send a WARN log message.
- Parameters:
tag- Used to identify the source of a log message.message- The function returning a message you would like logged.
-
i
final Unit i(String tag, Function0<String> message)
Send a INFO log message.
- Parameters:
tag- Used to identify the source of a log message.message- The function returning a message you would like logged.
-
d
final Unit d(String tag, Function0<String> message)
Send a DEBUG log message.
- Parameters:
tag- Used to identify the source of a log message.message- The function returning a message you would like logged.
-
-
-
-