Class Logger

java.lang.Object
com.polarion.core.util.logging.Logger
All Implemented Interfaces:
ILogger

public abstract class Logger extends Object implements ILogger
This class represents the main Logger object used to obtain logger instances.

Example:
ILogger logger = Logger.getLogger(this);
logger.warn("message");

Since:
3.22.2
  • Constructor Details

    • Logger

      public Logger()
  • Method Details

    • getLogger

      @NotNull public static Logger getLogger(@NotNull String client)
      A method to obtain the logger instance to perform logging.

      Example: Logger.getLogger("SomeClient").

      Parameters:
      client - the String representation of the object that wants to perform logging
      Returns:
      a logger instance that may be used by the client
    • getLogger

      @NotNull public static Logger getLogger(@NotNull Class<?> client)
      A method to obtain the logger instance to perform logging.

      Example: Logger.getLogger(SomeClass.class).

      Parameters:
      client - the class that wants to perform logging
      Returns:
      a logger instance that may be used by the client
    • getLogger

      @NotNull public static Logger getLogger(@NotNull Object client)
      A method to obtain the logger instance to perform logging.

      The recommended pattern is always calling Logger.getLogger(this).

      Parameters:
      client - the object that wants to perform logging
      Returns:
      a logger instance that may be used by the client