-
- All Implemented Interfaces:
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 static Booleaninspect(Function1<StreamLogger, Boolean> condition)Tests a condition on specified internalLogger implementation. final static UnitsetLogger(StreamLogger logger)Sets a StreamLogger implementation to be used. final static UnitsetValidator(IsLoggableValidator validator)Sets a IsLoggableValidator implementation to be used. final static TaggedLoggergetLogger(String tag)Returns a tagged logger. final static Unite(String tag, Throwable throwable, Function0<String> message)Send a ERROR log message. final static Unite(String tag, Function0<String> message)Send a ERROR log message. final static Unitw(String tag, Function0<String> message)Send a WARN log message. final static Uniti(String tag, Function0<String> message)Send a INFO log message. final static Unitd(String tag, Function0<String> message)Send a DEBUG log message. final static Unitv(String tag, Function0<String> message)Send a VERBOSE log message. -
-
Method Detail
-
inspect
final static Boolean inspect(Function1<StreamLogger, Boolean> condition)
Tests a condition on specified internalLogger implementation.
-
setLogger
final static Unit setLogger(StreamLogger logger)
Sets a StreamLogger implementation to be used.
-
setValidator
final static Unit setValidator(IsLoggableValidator validator)
Sets a IsLoggableValidator implementation to be used.
-
getLogger
final static TaggedLogger getLogger(String tag)
Returns a tagged logger.
-
e
final static 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 static 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 static 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 static 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 static 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.
-
-
-
-