Package playn.core
Class Log
java.lang.Object
playn.core.Log
Simple PlayN logging interface.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAllows for collection of log messages (in addition to standard logging).static enumTags a log message with a level. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLogsmsgat the debug level.voidLogsmsgat the debug level.voidLogsmsgandeat the debug level.voidLogsmsgat the error level.voidLogsmsgat the error level.voidLogsmsgandeat the error level.static StringBuilderformat(StringBuilder into, Object... args) Formats the supplied key/value arguments into the supplied string builder askey=value, key=value, ....voidLogsmsgat the info level.voidLogsmsgat the info level.voidLogsmsgandeat the info level.voidsetCollector(Log.Collector collector) Configures a log message collector.voidsetMinLevel(Log.Level level) Configures the minimum log level that will be logged.voidLogsmsgat the warn level.voidLogsmsgat the warn level.voidLogsmsgandeat 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 thanlevelwill 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
Logsmsgat the debug level. -
debug
Logsmsgat the debug level.- Parameters:
args- additional arguments formatted viaformat(java.lang.StringBuilder, java.lang.Object...)and appended to the message.argsmay contain an exception as its lone final argument which will be logged long with the formatted message.
-
debug
Logsmsgandeat the debug level. -
info
Logsmsgat the info level. -
info
Logsmsgat the info level.- Parameters:
args- additional arguments formatted viaformat(java.lang.StringBuilder, java.lang.Object...)and appended to the message.argsmay contain an exception as its lone final argument which will be logged long with the formatted message.
-
info
Logsmsgandeat the info level. -
warn
Logsmsgat the warn level. -
warn
Logsmsgat the warn level.- Parameters:
args- additional arguments formatted viaformat(java.lang.StringBuilder, java.lang.Object...)and appended to the message.argsmay contain an exception as its lone final argument which will be logged long with the formatted message.
-
warn
Logsmsgandeat the warn level. -
error
Logsmsgat the error level. -
error
Logsmsgat the error level.- Parameters:
args- additional arguments formatted viaformat(java.lang.StringBuilder, java.lang.Object...)and appended to the message.argsmay contain an exception as its lone final argument which will be logged long with the formatted message.
-
error
Logsmsgandeat the error level.
-