Class Logger

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static char CATEGORY_SEPARATOR
    • Constructor Summary

      Constructors 
      Constructor Description
      Logger()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract boolean isDebugEnabled() Determine if messages of priority DEBUG will be logged.
      abstract void debug(String message, Throwable throwable) Log a debug priority event.
      abstract void debug(String message) Log a debug priority event.
      abstract boolean isInfoEnabled() Determine if messages of priority INFO will be logged.
      abstract void info(String message, Throwable throwable) Log a info priority event.
      abstract void info(String message) Log a info priority event.
      abstract boolean isWarnEnabled() Determine if messages of priority WARN will be logged.
      abstract void warn(String message, Throwable throwable) Log a warn priority event.
      abstract void warn(String message) Log a warn priority event.
      abstract boolean isErrorEnabled() Determine if messages of priority ERROR will be logged.
      abstract void error(String message, Throwable throwable) Log a error priority event.
      abstract void error(String message) Log a error priority event.
      abstract boolean isFatalErrorEnabled() Determine if messages of priority FATAL_ERROR will be logged.
      abstract void fatalError(String message, Throwable throwable) Log a fatalError priority event.
      abstract void fatalError(String message) Log a fatalError priority event.
      void setAdditivity(boolean additivity) Make this logger additive.
      abstract boolean isPriorityEnabled(Priority priority) Determine if messages of priority will be logged.
      abstract void log(Priority priority, String message, Throwable throwable) Log a event at specific priority with a certain message and throwable.
      abstract void log(Priority priority, String message) Log a event at specific priority with a certain message.
      void setPriority(Priority priority) Set the priority for this logger.
      void unsetPriority() Unset the priority of Logger.
      void unsetPriority(boolean recursive) Unset the priority of Logger.
      void setLogTargets(Array<LogTarget> logTargets) Set the log targets for this logger.
      void unsetLogTargets() Unset the logtargets for this logger.
      void unsetLogTargets(boolean recursive) Unset the logtargets for this logger and all child loggers if recursive is set.
      Array<Logger> getChildren() Get all the child Loggers of current logger.
      abstract Logger getChildLogger(String subCategory) Create a new child logger.
      • Methods inherited from class java.lang.Object

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

      • Logger

        Logger()
    • Method Detail

      • isDebugEnabled

         abstract boolean isDebugEnabled()

        Determine if messages of priority DEBUG will be logged.

        Returns:

        true if DEBUG messages will be logged

      • debug

         abstract void debug(String message, Throwable throwable)

        Log a debug priority event.

        Parameters:
        message - the message
        throwable - the throwable
      • debug

         abstract void debug(String message)

        Log a debug priority event.

        Parameters:
        message - the message
      • isInfoEnabled

         abstract boolean isInfoEnabled()

        Determine if messages of priority INFO will be logged.

        Returns:

        true if INFO messages will be logged

      • info

         abstract void info(String message, Throwable throwable)

        Log a info priority event.

        Parameters:
        message - the message
        throwable - the throwable
      • info

         abstract void info(String message)

        Log a info priority event.

        Parameters:
        message - the message
      • isWarnEnabled

         abstract boolean isWarnEnabled()

        Determine if messages of priority WARN will be logged.

        Returns:

        true if WARN messages will be logged

      • warn

         abstract void warn(String message, Throwable throwable)

        Log a warn priority event.

        Parameters:
        message - the message
        throwable - the throwable
      • warn

         abstract void warn(String message)

        Log a warn priority event.

        Parameters:
        message - the message
      • isErrorEnabled

         abstract boolean isErrorEnabled()

        Determine if messages of priority ERROR will be logged.

        Returns:

        true if ERROR messages will be logged

      • error

         abstract void error(String message, Throwable throwable)

        Log a error priority event.

        Parameters:
        message - the message
        throwable - the throwable
      • error

         abstract void error(String message)

        Log a error priority event.

        Parameters:
        message - the message
      • isFatalErrorEnabled

         abstract boolean isFatalErrorEnabled()

        Determine if messages of priority FATAL_ERROR will be logged.

        Returns:

        true if FATAL_ERROR messages will be logged

      • fatalError

         abstract void fatalError(String message, Throwable throwable)

        Log a fatalError priority event.

        Parameters:
        message - the message
        throwable - the throwable
      • fatalError

         abstract void fatalError(String message)

        Log a fatalError priority event.

        Parameters:
        message - the message
      • setAdditivity

        @Deprecated() void setAdditivity(boolean additivity)

        Make this logger additive. I.e. Send all log events to parent loggers LogTargets regardless of whether or not the LogTargets have been overridden. This is derived from Log4js notion of Additivity.

        Parameters:
        additivity - true to make logger additive, false otherwise
      • isPriorityEnabled

         abstract boolean isPriorityEnabled(Priority priority)

        Determine if messages of priority will be logged.

        Parameters:
        priority - the priority
        Returns:

        true if messages will be logged

      • log

         abstract void log(Priority priority, String message, Throwable throwable)

        Log a event at specific priority with a certain message and throwable.

        Parameters:
        priority - the priority
        message - the message
        throwable - the throwable
      • log

         abstract void log(Priority priority, String message)

        Log a event at specific priority with a certain message.

        Parameters:
        priority - the priority
        message - the message
      • unsetPriority

        @Deprecated() void unsetPriority()

        Unset the priority of Logger. (Thus it will use it's parent's priority or DEBUG if no parent.

      • unsetPriority

        @Deprecated() void unsetPriority(boolean recursive)

        Unset the priority of Logger. (Thus it will use it's parent's priority or DEBUG if no parent. If recursive is true unset priorities of all child loggers.

        Parameters:
        recursive - true to unset priority of all child loggers
      • unsetLogTargets

        @Deprecated() void unsetLogTargets()

        Unset the logtargets for this logger. This logger (and thus all child loggers who don't specify logtargets) will inherit from the parents LogTargets.

      • unsetLogTargets

        @Deprecated() void unsetLogTargets(boolean recursive)

        Unset the logtargets for this logger and all child loggers if recursive is set. The loggers unset (and all child loggers who don't specify logtargets) will inherit from the parents LogTargets.

        Parameters:
        recursive - the recursion policy
      • getChildLogger

         abstract Logger getChildLogger(String subCategory)

        Create a new child logger. The category of child logger is [current-category].subcategory

        Parameters:
        subCategory - the subcategory of this logger
        Returns:

        the new logger