Class Log

java.lang.Object
tsp.csc4509.common.Log

public final class Log extends Object
This class contains the configuration of some logging facilities. To recapitulate, logging levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL.
Author:
Denis Conan
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.logging.log4j.Logger
    logger object for the communication part.
    static final org.apache.logging.log4j.Logger
    logger object for the general part.
    static final String
    name of logger for the communication part.
    static final String
    name of logger for the general part (config, etc.).
    static final String
    name of logger for the testing part (used in JUnit classes).
    static final boolean
    states whether logging is enabled or not.
    static final org.apache.logging.log4j.Logger
    logger object for the testing part.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    setLevel(org.apache.logging.log4j.Logger logger, org.apache.logging.log4j.Level level)
    configures a logger to a level.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ON

      public static final boolean ON
      states whether logging is enabled or not.
      See Also:
    • LOGGER_NAME_GEN

      public static final String LOGGER_NAME_GEN
      name of logger for the general part (config, etc.).
      See Also:
    • GEN

      public static final org.apache.logging.log4j.Logger GEN
      logger object for the general part.
    • LOGGER_NAME_COMM

      public static final String LOGGER_NAME_COMM
      name of logger for the communication part.
      See Also:
    • COMM

      public static final org.apache.logging.log4j.Logger COMM
      logger object for the communication part.
    • LOGGER_NAME_TEST

      public static final String LOGGER_NAME_TEST
      name of logger for the testing part (used in JUnit classes).
      See Also:
    • TEST

      public static final org.apache.logging.log4j.Logger TEST
      logger object for the testing part.
  • Method Details

    • setLevel

      public static void setLevel(org.apache.logging.log4j.Logger logger, org.apache.logging.log4j.Level level)
      configures a logger to a level.
      Parameters:
      logger - the logger.
      level - the level.