Class LogChannel

java.lang.Object
overit.geocall.util.log.LogChannel

@Component @Scope(scopeName="prototype", proxyMode=NO) public class LogChannel extends Object
Class that manages the log channel for all the logging data
  • Field Details

    • DISCARD_CLASS

      protected static String DISCARD_CLASS
    • name

      protected String name
    • logger

      protected Logger logger
  • Constructor Details

    • LogChannel

      protected LogChannel(Class c)
    • LogChannel

      protected LogChannel(String name)
  • Method Details

    • forClass

      public static LogChannel forClass(Class c)
      This method can be called to inizialize and get a LogChannel for the passed class. The recommendation is to use it in static contexts to initialize a local static log channel for the class
      Parameters:
      c - the class for which you are requesting the LogChannel
      Returns:
      LogChannel for c
    • forThisClass

      public static LogChannel forThisClass()
      This method can be called only from a static context, to inizialize and get only one time a local static LogChannel it thorws an AssertionException f
      Returns:
      LogChannel for the current class
    • getName

      public String getName()
      Returns the name of the LogChannel
      Returns:
      The name of the LogChannel
    • isEnabled

      @Deprecated public boolean isEnabled()
      Deprecated.
      Returns:
      true if Level.INFO is greater or equal compared to the effective level, false otherwise
    • isEnabled

      public boolean isEnabled(Level level)
      Parameters:
      level - The effective level to compare
      Returns:
      true if Level.INFO is greater or equal compared to the effective level, false otherwise
    • isEnabled

      @Deprecated public boolean isEnabled(LogLevel level)
      Deprecated.
      use isEnabled(Level) instead.
      Parameters:
      level - The effective level to compare
      Returns:
      true if Level.INFO is greater or equal compared to the effective level, false otherwise
    • toString

      protected static String toString(Throwable t)
    • out

      public void out(String msg)
      Out
      Parameters:
      msg - The message
    • out

      public void out(Level level, String msg)
      Out
      Parameters:
      level - The severity level of the message
      msg - The string containing the message
    • out

      @Deprecated public void out(LogLevel level, String msg)
      Deprecated.
      use out(Level, String) instead.
      Out
      Parameters:
      level - The severity level of the message
      msg - The string containing the message
    • out

      public void out(Throwable t)
      Out
      Parameters:
      t - The Throwable
    • out

      public void out(Level level, Throwable t)
      Out
      Parameters:
      level - The severity level of the message
      t - The Throwable
    • out

      @Deprecated public void out(LogLevel level, Throwable t)
      Deprecated.
      Out
      Parameters:
      level - The severity level of the message
      t - The Throwable
    • out

      public void out(String msg, Throwable t)
      Out
      Parameters:
      msg - The string containing the message
      t - The Throwable
    • out

      public void out(Level level, String msg, Throwable t)
      Out
      Parameters:
      level - The severity level of the message
      msg - The string containing the message
      t - The Throwable
    • out

      @Deprecated public void out(LogLevel level, String msg, Throwable t)
      Deprecated.
      Out
      Parameters:
      level - The severity level of the message
      msg - The string containing the message
      t - The Throwable
    • out

      public void out(String discardClass, Level level, String msg, Throwable t)
      Out
      Parameters:
      discardClass - The discard class string
      level - The severity level of the message
      msg - String containing the message
      t - The Throwable
    • out

      @Deprecated public void out(String discardClass, LogLevel level, String msg, Throwable t)
      Deprecated.
      Out
      Parameters:
      discardClass - The discard class string
      level - The severity level of the message
      msg - String containing the message
      t - The Throwable
    • out

      public void out(Level level, String format, Object... arguments)
      Logs a Message using the provided parameters.
      Parameters:
      level - The severity level of the message.
      format - String containing the message (with any placeholder '{}' to be replaced with message parameters).
      arguments - Message parameters.
    • out

      public void out(String msg, Object... arguments)
      Logs a Message using the provided parameters.
      Parameters:
      msg - String containing the message (with any placeholder '{}' to be replaced with message parameters).
      arguments - The arguments to be included in the log message.
    • message

      public void message(Level level, LogMessage msg, Throwable t)
      Out a message
      Parameters:
      level - The severity level of the message
      msg - The LogMessage
      t - The Throwable
    • message

      @Deprecated public void message(LogLevel level, LogMessage msg, Throwable t)
      Deprecated.
      Out a message
      Parameters:
      level - The severity level of the message
      msg - The LogMessage
      t - The Throwable
    • message

      protected void message(String discardClass, Level level, LogMessage msg, Throwable t)