Class BaseLogger

java.lang.Object
software.bluelib.utils.logging.BaseLogger

public class BaseLogger extends Object
A public class responsible for logging messages with various logging levels and configurations for BlueLib.

Key Methods:

Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    A Boolean method that checks if BlueLib logging is enabled.
    static boolean
    A Boolean method that checks if logging is enabled.
    static void
    log(Level pLogLevel, String pMessage)
    A public static void that logs a message if general logging is enabled.
    static void
    log(Level pLogLevel, String pMessage, boolean pIsBlueLib)
    A public static void that logs a message if BlueLib logging is enabled.
    static void
    log(Level pLogLevel, String pMessage, Throwable pThrowable)
    A public static void that logs a message with an associated Throwable if general logging is enabled.
    static void
    log(Level pLogLevel, String pMessage, Throwable pThrowable, boolean pIsBlueLib)
    A public static void that logs a message with an associated Throwable if BlueLib logging is enabled.
    static void
    logBlueLib(String pMessage)
    A public static void that logs a BlueLib specific message at the BlueLib log level.
    static void
    setBlueLibLoggingEnabled(boolean pEnabled)
    A void to enable or disable BlueLib specific logging.
    static void
    setLoggingEnabled(boolean pEnabled)
    A void to enable or disable general logging.

    Methods inherited from class java.lang.Object

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

    • setBlueLibLoggingEnabled

      public static void setBlueLibLoggingEnabled(boolean pEnabled)
      A void to enable or disable BlueLib specific logging.
      Parameters:
      pEnabled - Boolean - Indicates whether to enable or disable BlueLib logging.
      Since:
      1.0.0
    • isBlueLibLoggingEnabled

      public static boolean isBlueLibLoggingEnabled()
      A Boolean method that checks if BlueLib logging is enabled.
      Returns:
      true if BlueLib logging is enabled, false otherwise.
      Since:
      1.0.0
    • isLoggingEnabled

      public static boolean isLoggingEnabled()
      A Boolean method that checks if logging is enabled.
      Returns:
      true if general logging is enabled, false otherwise.
      Since:
      1.0.0
    • setLoggingEnabled

      public static void setLoggingEnabled(boolean pEnabled)
      A void to enable or disable general logging.
      Parameters:
      pEnabled - Boolean - Indicates whether to enable or disable general logging.
      Since:
      1.0.0
    • log

      public static void log(Level pLogLevel, String pMessage, Throwable pThrowable, boolean pIsBlueLib)
      A public static void that logs a message with an associated Throwable if BlueLib logging is enabled.
      Parameters:
      pLogLevel - Level - The logging level to use.
      pMessage - String - The message to log.
      pThrowable - Throwable - The throwable to log with the message.
      pIsBlueLib - Boolean - Indicates if the message is BlueLib specific.
      Since:
      1.0.0
    • log

      public static void log(Level pLogLevel, String pMessage, boolean pIsBlueLib)
      A public static void that logs a message if BlueLib logging is enabled.
      Parameters:
      pLogLevel - Level - The logging level to use.
      pMessage - String - The message to log.
      pIsBlueLib - Boolean - Indicates if the message is BlueLib specific.
      Since:
      1.0.0
    • log

      public static void log(Level pLogLevel, String pMessage, Throwable pThrowable)
      A public static void that logs a message with an associated Throwable if general logging is enabled.
      Parameters:
      pLogLevel - Level - The logging level to use.
      pMessage - String - The message to log.
      pThrowable - Throwable - The throwable to log with the message.
      Since:
      1.0.0
    • log

      public static void log(Level pLogLevel, String pMessage)
      A public static void that logs a message if general logging is enabled.
      Parameters:
      pLogLevel - Level - The logging level to use.
      pMessage - String - The message to log.
      Since:
      1.0.0
    • logBlueLib

      public static void logBlueLib(String pMessage)
      A public static void that logs a BlueLib specific message at the BlueLib log level.
      Parameters:
      pMessage - String - The BlueLib message to log.
      Since:
      1.0.0