Class Logger


  • public class Logger
    extends java.lang.Object
    Simple logger that uses the Application logging facilities to output messages. The log level set with Application.setLogLevel(int) overrides the log level set here.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int DEBUG  
      static int ERROR  
      static int INFO  
      static int NONE  
    • Constructor Summary

      Constructors 
      Constructor Description
      Logger​(java.lang.String tag)  
      Logger​(java.lang.String tag, int level)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debug​(java.lang.String message)  
      void debug​(java.lang.String message, java.lang.Exception exception)  
      void error​(java.lang.String message)  
      void error​(java.lang.String message, java.lang.Throwable exception)  
      int getLevel()  
      void info​(java.lang.String message)  
      void info​(java.lang.String message, java.lang.Exception exception)  
      void setLevel​(int level)
      Sets the log level.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Logger

        public Logger​(java.lang.String tag)
      • Logger

        public Logger​(java.lang.String tag,
                      int level)
    • Method Detail

      • debug

        public void debug​(java.lang.String message)
      • debug

        public void debug​(java.lang.String message,
                          java.lang.Exception exception)
      • info

        public void info​(java.lang.String message)
      • info

        public void info​(java.lang.String message,
                         java.lang.Exception exception)
      • error

        public void error​(java.lang.String message)
      • error

        public void error​(java.lang.String message,
                          java.lang.Throwable exception)
      • setLevel

        public void setLevel​(int level)
        Sets the log level. NONE will mute all log output. ERROR will only let error messages through. INFO will let all non-debug messages through, and DEBUG will let all messages through.
        Parameters:
        level - NONE, ERROR, INFO, DEBUG.
      • getLevel

        public int getLevel()