Class Log

All Implemented Interfaces:
Serializable, Executor, Monitorable

public class Log extends Actor<Log>
Created by ruedi on 24.08.14. A wrapper for logging + metrics. This logger facade is asynchronous (so does not block by IO). In order to redirect logging, use Log.Lg.setLogWrapper( .. ); Note its possible to log to a remote host using kontraktor remoting as the core logging class is an actor.
See Also:
  • Field Details

  • Constructor Details

    • Log

      public Log()
  • Method Details

    • SetSynchronous

      public static void SetSynchronous()
    • setLevel

      public static int setLevel(int level)
      Sets the logging level to the specified value.
      Parameters:
      level - = Log.DEBUG | Log.INFO | Log.WARN | Log.ERROR
      Returns:
      the previously set severity
    • Info

      public static void Info(Object source, String msg)
    • Info

      public static void Info(Object source, Throwable ex)
    • Debug

      public static void Debug(String msg)
    • Debug

      public static void Debug(Object source, String msg)
    • Debug

      public static void Debug(Object source, Throwable th)
    • Info

      public static void Info(Object source, Throwable t, String msg)
    • Warn

      public static void Warn(Object source, Throwable t, String msg)
    • Warn

      public static void Warn(Object source, String msg)
    • Warn

      public static void Warn(Object source, Throwable ex)
    • Error

      public static void Error(Object source, String s)
    • Error

      public static void Error(Object source, Throwable th)
    • Error

      public static void Error(Object source, Throwable th, String s)
    • setLogWrapper

      public void setLogWrapper(Log.LogWrapper delegate)
    • setSeverity

      public void setSeverity(int severity)
    • self

      protected Log self()
      Description copied from class: Actor
      use this to call public methods using actor-dispatch instead of direct in-thread call. Important: When passing references out of your actor, always pass 'self()' instead of this !
      Overrides:
      self in class Actor<Log>
      Returns:
    • getSeverity

      public int getSeverity()
    • resetToSysout

      public void resetToSysout()
    • infoLong

      public void infoLong(Object source, Throwable ex, String msg)
    • debug

      public void debug(Object source, String msg)
    • debugLong

      public void debugLong(Object source, Throwable th, String msg)
    • info

      public void info(Object source, String msg)
    • warnLong

      public void warnLong(Object source, Throwable ex, String msg)
    • warn

      public void warn(Object source, String msg)
    • error

      public void error(Object source, Throwable ex, String msg)
    • msg

      public void msg(Thread t, int severity, Object source, Throwable ex, String msg)