Package playn.core
Class Log
java.lang.Object
playn.core.Log
Simple PlayN logging interface.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Allows for collection of log messages (in addition to standard logging).static enum
Tags a log message with a level. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Logsmsg
at the debug level.void
Logsmsg
at the debug level.void
Logsmsg
ande
at the debug level.void
Logsmsg
at the error level.void
Logsmsg
at the error level.void
Logsmsg
ande
at the error level.static StringBuilder
format
(StringBuilder into, Object... args) Formats the supplied key/value arguments into the supplied string builder askey=value, key=value, ...
.void
Logsmsg
at the info level.void
Logsmsg
at the info level.void
Logsmsg
ande
at the info level.void
setCollector
(Log.Collector collector) Configures a log message collector.void
setMinLevel
(Log.Level level) Configures the minimum log level that will be logged.void
Logsmsg
at the warn level.void
Logsmsg
at the warn level.void
Logsmsg
ande
at the warn level.
-
Constructor Details
-
Log
public Log()
-
-
Method Details
-
format
Formats the supplied key/value arguments into the supplied string builder askey=value, key=value, ...
.- Returns:
- the supplied string builder.
-
setCollector
Configures a log message collector. This allows games to intercept (and record and submit with bug reports, for example) all messages logged via the PlayN logging system. This will include errors logged internally by PlayN code. -
setMinLevel
Configures the minimum log level that will be logged. Messages at a level lower thanlevel
will be suppressed. Note that all messages are still passed to any registeredLog.Collector
, but suppressed messages are not sent to the platform logging system. -
debug
Logsmsg
at the debug level. -
debug
Logsmsg
at the debug level.- Parameters:
args
- additional arguments formatted viaformat(java.lang.StringBuilder, java.lang.Object...)
and appended to the message.args
may contain an exception as its lone final argument which will be logged long with the formatted message.
-
debug
Logsmsg
ande
at the debug level. -
info
Logsmsg
at the info level. -
info
Logsmsg
at the info level.- Parameters:
args
- additional arguments formatted viaformat(java.lang.StringBuilder, java.lang.Object...)
and appended to the message.args
may contain an exception as its lone final argument which will be logged long with the formatted message.
-
info
Logsmsg
ande
at the info level. -
warn
Logsmsg
at the warn level. -
warn
Logsmsg
at the warn level.- Parameters:
args
- additional arguments formatted viaformat(java.lang.StringBuilder, java.lang.Object...)
and appended to the message.args
may contain an exception as its lone final argument which will be logged long with the formatted message.
-
warn
Logsmsg
ande
at the warn level. -
error
Logsmsg
at the error level. -
error
Logsmsg
at the error level.- Parameters:
args
- additional arguments formatted viaformat(java.lang.StringBuilder, java.lang.Object...)
and appended to the message.args
may contain an exception as its lone final argument which will be logged long with the formatted message.
-
error
Logsmsg
ande
at the error level.
-