Package playn.core

Class Log

java.lang.Object
playn.core.Log

public abstract class Log extends Object
Simple PlayN logging interface.
  • Constructor Details

    • Log

      public Log()
  • Method Details

    • format

      public static StringBuilder format(StringBuilder into, Object... args)
      Formats the supplied key/value arguments into the supplied string builder as key=value, key=value, ....
      Returns:
      the supplied string builder.
    • setCollector

      public void setCollector(Log.Collector collector)
      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

      public void setMinLevel(Log.Level level)
      Configures the minimum log level that will be logged. Messages at a level lower than level will be suppressed. Note that all messages are still passed to any registered Log.Collector, but suppressed messages are not sent to the platform logging system.
    • debug

      public void debug(String msg)
      Logs msg at the debug level.
    • debug

      public void debug(String msg, Object... args)
      Logs msg at the debug level.
      Parameters:
      args - additional arguments formatted via format(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

      public void debug(String msg, Throwable e)
      Logs msg and e at the debug level.
    • info

      public void info(String msg)
      Logs msg at the info level.
    • info

      public void info(String msg, Object... args)
      Logs msg at the info level.
      Parameters:
      args - additional arguments formatted via format(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

      public void info(String msg, Throwable e)
      Logs msg and e at the info level.
    • warn

      public void warn(String msg)
      Logs msg at the warn level.
    • warn

      public void warn(String msg, Object... args)
      Logs msg at the warn level.
      Parameters:
      args - additional arguments formatted via format(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

      public void warn(String msg, Throwable e)
      Logs msg and e at the warn level.
    • error

      public void error(String msg)
      Logs msg at the error level.
    • error

      public void error(String msg, Object... args)
      Logs msg at the error level.
      Parameters:
      args - additional arguments formatted via format(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

      public void error(String msg, Throwable e)
      Logs msg and e at the error level.