Class WebConsole

  • All Implemented Interfaces:
    java.io.Serializable

    public class WebConsole
    extends java.lang.Object
    implements java.io.Serializable
    This class can be used to print messages to the logger. The first parameter can be a message-object containing format specifiers such as ("%o", "%s", "%d", "%i", "%f"). The logging methods are null-safe, so if the number of format specifiers and the numbers of parameters don't match, no exception is thrown. The default logger uses Apache Commons Logging.
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  WebConsole.Formatter
      This interface can be implemented by clients that want to customize the way parameters and objects are logged.
      static interface  WebConsole.Logger
      A simple logging interface abstracting logging APIs.
    • Constructor Summary

      Constructors 
      Constructor Description
      WebConsole()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debug​(java.lang.Object... args)
      Prints the passed objects using logger debug level.
      void error​(java.lang.Object... args)
      Prints the passed objects using logger error level.
      WebConsole.Formatter getFormatter()
      Returns the current Formatter.
      WebConsole.Logger getLogger()
      Returns the current Logger.
      void info​(java.lang.Object... args)
      Prints the passed objects using logger info level.
      void setFormatter​(WebConsole.Formatter formatter)
      Sets the Formatter.
      void setLogger​(WebConsole.Logger logger)
      Sets the Logger_.
      void trace​(java.lang.Object... args)
      Prints the passed objects using logger trace level.
      void warn​(java.lang.Object... args)
      Prints the passed objects using logger warn level.
      • Methods inherited from class java.lang.Object

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

      • WebConsole

        public WebConsole()
    • Method Detail

      • setFormatter

        public void setFormatter​(WebConsole.Formatter formatter)
        Sets the Formatter.
        Parameters:
        formatter - the formatter
      • getFormatter

        public WebConsole.Formatter getFormatter()
        Returns the current Formatter.
        Returns:
        the Formatter
      • setLogger

        public void setLogger​(WebConsole.Logger logger)
        Sets the Logger_.
        Parameters:
        logger - the logger
      • getLogger

        public WebConsole.Logger getLogger()
        Returns the current Logger.
        Returns:
        the logger
      • trace

        public void trace​(java.lang.Object... args)
        Prints the passed objects using logger trace level.
        Parameters:
        args - the logging parameters
      • debug

        public void debug​(java.lang.Object... args)
        Prints the passed objects using logger debug level.
        Parameters:
        args - the logging parameters
      • info

        public void info​(java.lang.Object... args)
        Prints the passed objects using logger info level.
        Parameters:
        args - the logging parameters
      • warn

        public void warn​(java.lang.Object... args)
        Prints the passed objects using logger warn level.
        Parameters:
        args - the logging parameters
      • error

        public void error​(java.lang.Object... args)
        Prints the passed objects using logger error level.
        Parameters:
        args - the logging parameters