Interface ILcdLogger


public interface ILcdLogger
Logging interface for LuciadLightspeed. It acts as a wrapper around a concrete logging framework implementation.

You typically don't need to use ILcdLogger directly. Instead, you can use the logging framework of your choice and make sure LuciadLightspeed connects to it by configuring an ILcdLoggerFactory, as illustrated in this tutorial.

Sorted in ascending order of importance, the log levels are:

  • trace
  • debug
  • info
  • warn
  • error
The methods which take a Supplier<String> as argument can be used to simplify statements like:

   //String concatenation only happens when the message will be logged
   //thanks to the if check
   if (logger.isDebugEnabled()){
     logger.debug( "A message with " + "expensive String concatenation");
   }
 
to

   //String concatenation will still only happen when the message will be logged,
   //but the if check can be avoided
   logger.debug( () -> "A message with " + "expensive String concatenation");
 
Since:
9.0
See Also:
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    debug(String aMessage)
    Records a debug message.
    void
    debug(String aMessage, Object aParameter)
    Records a debug message and an associated parameter object.
    default void
    debug(String aMessage, Object... aParameters)
    Records a debug message and the associated parameters.
    void
    debug(String aMessage, Object aParameter, Throwable aThrowable)
    Records a debug message, an associated parameter and a Throwable object.
    void
    debug(String aMessage, Throwable aThrowable)
    Records a debug message and a Throwable object.
    default void
    debug(String aMessage, Throwable aThrowable, Object... aParameters)
    Records a debug message, the associated parameters and a Throwable object.
    default void
    debug(Supplier<String> aMessageSupplier)
    Records a debug message supplier, which is only evaluated when debug messages are enabled.
    default void
    debug(Supplier<String> aMessageSupplier, Throwable aThrowable)
    Records a Throwable object and a debug message supplier, which is only evaluated when debug messages are enabled.
    void
    error(String aMessage)
    Records an error message.
    void
    error(String aMessage, Object aParameter)
    Records an error message and an associated parameter object.
    default void
    error(String aMessage, Object... aParameters)
    Records an error message and the associated parameters.
    void
    error(String aMessage, Object aParameter, Throwable aThrowable)
    Records an error message, an associated parameter and a Throwable object.
    void
    error(String aMessage, Throwable aThrowable)
    Records an error message and a Throwable object.
    default void
    error(String aMessage, Throwable aThrowable, Object... aParameters)
    Records an error message, the associated parameters and a Throwable object.
    default void
    error(Supplier<String> aMessageSupplier)
    Records an error message supplier, which is only evaluated when error messages are enabled.
    default void
    error(Supplier<String> aMessageSupplier, Throwable aThrowable)
    Records a Throwable object and an error message supplier, which is only evaluated when error messages are enabled.
    void
    info(String aMessage)
    Records an informational message.
    void
    info(String aMessage, Object aParameter)
    Records an informational message and an associated parameter object.
    default void
    info(String aMessage, Object... aParameters)
    Records an informational message and the associated parameters.
    void
    info(String aMessage, Object aParameter, Throwable aThrowable)
    Records an informational message, an associated parameter and a Throwable object.
    void
    info(String aMessage, Throwable aThrowable)
    Records an informational message and a Throwable object.
    default void
    info(String aMessage, Throwable aThrowable, Object... aParameters)
    Records an informational message, the associated parameters and a Throwable object.
    default void
    info(Supplier<String> aMessageSupplier)
    Records an info message supplier, which is only evaluated when info messages are enabled.
    default void
    info(Supplier<String> aMessageSupplier, Throwable aThrowable)
    Records a Throwable object and an info message supplier, which is only evaluated when info messages are enabled.
    boolean
    Returns true if debug messages are logged.
    boolean
    Returns true if error messages are logged.
    boolean
    Returns true if informational messages are logged.
    boolean
    Returns true if trace messages are logged.
    boolean
    Returns true if warning messages are logged.
    void
    trace(String aMessage)
    Records a trace message.
    void
    trace(String aMessage, Object aParameter)
    Records a trace message and an associated parameter object.
    default void
    trace(String aMessage, Object... aParameters)
    Records a trace message and the associated parameters.
    void
    trace(String aMessage, Object aParameter, Throwable aThrowable)
    Records a trace message, an associated parameter and a Throwable object.
    void
    trace(String aMessage, Throwable aThrowable)
    Records a trace message and a Throwable object.
    default void
    trace(String aMessage, Throwable aThrowable, Object... aParameters)
    Records a trace message, the associated parameters and a Throwable object.
    default void
    trace(Supplier<String> aMessageSupplier)
    Records a trace message supplier, which is only evaluated when trace messages are enabled.
    default void
    trace(Supplier<String> aMessageSupplier, Throwable aThrowable)
    Records a Throwable object and a trace message supplier, which is only evaluated when trace messages are enabled.
    void
    warn(String aMessage)
    Records a warning message.
    void
    warn(String aMessage, Object aParameter)
    Records a warning message and an associated parameter object.
    default void
    warn(String aMessage, Object... aParameters)
    Records a warning message and the associated parameters.
    void
    warn(String aMessage, Object aParameter, Throwable aThrowable)
    Records a warning message, an associated parameter and a Throwable object.
    void
    warn(String aMessage, Throwable aThrowable)
    Records a warning message and a Throwable object.
    default void
    warn(String aMessage, Throwable aThrowable, Object... aParameters)
    Records a warning message, the associated parameters and a Throwable object.
    default void
    warn(Supplier<String> aMessageSupplier)
    Records a warning message supplier, which is only evaluated when warning messages are enabled.
    default void
    warn(Supplier<String> aMessageSupplier, Throwable aThrowable)
    Records a Throwable object and a warning message supplier, which is only evaluated when warning messages are enabled.
  • Method Details Link icon

    • isTraceEnabled Link icon

      boolean isTraceEnabled()
      Returns true if trace messages are logged.
      Returns:
      true if trace messages are logged, false otherwise.
    • trace Link icon

      default void trace(Supplier<String> aMessageSupplier)
      Records a trace message supplier, which is only evaluated when trace messages are enabled. This method can be used to remove the overhead of generating a message (for example String concatenation) when messages will not actually be logged.
      Parameters:
      aMessageSupplier - A function, which when called, produces the desired log message
      Since:
      2017.0
    • trace Link icon

      void trace(String aMessage)
      Records a trace message.
      Parameters:
      aMessage - the formatted message.
    • trace Link icon

      default void trace(Supplier<String> aMessageSupplier, Throwable aThrowable)
      Records a Throwable object and a trace message supplier, which is only evaluated when trace messages are enabled. This method can be used to remove the overhead of generating a message (for example String concatenation) when messages will not actually be logged.
      Parameters:
      aMessageSupplier - A function, which when called, produces the desired log formatted message.
      aThrowable - the Throwable object.
      Since:
      2017.0
    • trace Link icon

      void trace(String aMessage, Throwable aThrowable)
      Records a trace message and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aThrowable - the Throwable object.
    • trace Link icon

      void trace(String aMessage, Object aParameter)
      Records a trace message and an associated parameter object.
      Parameters:
      aMessage - the formatted message.
      aParameter - a parameter referenced by the message
    • trace Link icon

      default void trace(String aMessage, Object... aParameters)
      Records a trace message and the associated parameters.
      Parameters:
      aMessage - the formatted message.
      aParameters - the parameters referenced by the message
      Since:
      2019.1
    • trace Link icon

      void trace(String aMessage, Object aParameter, Throwable aThrowable)
      Records a trace message, an associated parameter and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aParameter - the associated parameter.
      aThrowable - the associated Throwable.
    • trace Link icon

      default void trace(String aMessage, Throwable aThrowable, Object... aParameters)
      Records a trace message, the associated parameters and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aThrowable - the associated Throwable.
      aParameters - the associated parameters.
      Since:
      2019.1
    • isDebugEnabled Link icon

      boolean isDebugEnabled()
      Returns true if debug messages are logged.
      Returns:
      true if debug messages are logged, false otherwise.
    • debug Link icon

      default void debug(Supplier<String> aMessageSupplier)
      Records a debug message supplier, which is only evaluated when debug messages are enabled. This method can be used to remove the overhead of generating a message (for example String concatenation) when messages will not actually be logged.
      Parameters:
      aMessageSupplier - A function, which when called, produces the desired log message
      Since:
      2017.0
    • debug Link icon

      void debug(String aMessage)
      Records a debug message.
      Parameters:
      aMessage - the formatted message.
    • debug Link icon

      default void debug(Supplier<String> aMessageSupplier, Throwable aThrowable)
      Records a Throwable object and a debug message supplier, which is only evaluated when debug messages are enabled. This method can be used to remove the overhead of generating a message (for example String concatenation) when messages will not actually be logged.
      Parameters:
      aMessageSupplier - A function, which when called, produces the desired log formatted message.
      aThrowable - the Throwable object.
      Since:
      2017.0
    • debug Link icon

      void debug(String aMessage, Throwable aThrowable)
      Records a debug message and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aThrowable - the Throwable object.
    • debug Link icon

      void debug(String aMessage, Object aParameter)
      Records a debug message and an associated parameter object.
      Parameters:
      aMessage - the formatted message.
      aParameter - a parameter referenced by the message
    • debug Link icon

      default void debug(String aMessage, Object... aParameters)
      Records a debug message and the associated parameters.
      Parameters:
      aMessage - the formatted message.
      aParameters - the parameters referenced by the message
      Since:
      2019.1
    • debug Link icon

      void debug(String aMessage, Object aParameter, Throwable aThrowable)
      Records a debug message, an associated parameter and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aParameter - a parameter referenced by the message
      aThrowable - the associated Throwable.
    • debug Link icon

      default void debug(String aMessage, Throwable aThrowable, Object... aParameters)
      Records a debug message, the associated parameters and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aThrowable - the associated Throwable.
      aParameters - the parameters referenced by the message
      Since:
      2019.1
    • isInfoEnabled Link icon

      boolean isInfoEnabled()
      Returns true if informational messages are logged.
      Returns:
      true if informational messages are logged, false otherwise.
    • info Link icon

      default void info(Supplier<String> aMessageSupplier)
      Records an info message supplier, which is only evaluated when info messages are enabled. This method can be used to remove the overhead of generating a message (for example String concatenation) when messages will not actually be logged.
      Parameters:
      aMessageSupplier - A function, which when called, produces the desired log message
      Since:
      2017.0
    • info Link icon

      void info(String aMessage)
      Records an informational message.
      Parameters:
      aMessage - the informational message.
    • info Link icon

      default void info(Supplier<String> aMessageSupplier, Throwable aThrowable)
      Records a Throwable object and an info message supplier, which is only evaluated when info messages are enabled. This method can be used to remove the overhead of generating a message (for example String concatenation) when messages will not actually be logged.
      Parameters:
      aMessageSupplier - A function, which when called, produces the desired log formatted message.
      aThrowable - the Throwable object.
      Since:
      2017.0
    • info Link icon

      void info(String aMessage, Throwable aThrowable)
      Records an informational message and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aThrowable - the Throwable object.
    • info Link icon

      void info(String aMessage, Object aParameter)
      Records an informational message and an associated parameter object.
      Parameters:
      aMessage - the formatted message.
      aParameter - a parameter that can be referenced by the message
    • info Link icon

      default void info(String aMessage, Object... aParameters)
      Records an informational message and the associated parameters.
      Parameters:
      aMessage - the formatted message.
      aParameters - the parameters that can be referenced by the message
      Since:
      2019.1
    • info Link icon

      void info(String aMessage, Object aParameter, Throwable aThrowable)
      Records an informational message, an associated parameter and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aParameter - a parameter that can be referenced by the message
      aThrowable - the associated Throwable.
    • info Link icon

      default void info(String aMessage, Throwable aThrowable, Object... aParameters)
      Records an informational message, the associated parameters and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aThrowable - the associated Throwable.
      aParameters - the parameters that can be referenced by the message
      Since:
      2019.1
    • isWarnEnabled Link icon

      boolean isWarnEnabled()
      Returns true if warning messages are logged.
      Returns:
      true if warning messages are logged, false otherwise.
    • warn Link icon

      default void warn(Supplier<String> aMessageSupplier)
      Records a warning message supplier, which is only evaluated when warning messages are enabled. This method can be used to remove the overhead of generating a message (for example String concatenation) when messages will not actually be logged.
      Parameters:
      aMessageSupplier - A function, which when called, produces the desired log message
      Since:
      2017.0
    • warn Link icon

      void warn(String aMessage)
      Records a warning message.
      Parameters:
      aMessage - the formatted message.
    • warn Link icon

      default void warn(Supplier<String> aMessageSupplier, Throwable aThrowable)
      Records a Throwable object and a warning message supplier, which is only evaluated when warning messages are enabled. This method can be used to remove the overhead of generating a message (for example String concatenation) when messages will not actually be logged.
      Parameters:
      aMessageSupplier - A function, which when called, produces the desired log formatted message.
      aThrowable - the Throwable object.
      Since:
      2017.0
    • warn Link icon

      void warn(String aMessage, Throwable aThrowable)
      Records a warning message and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aThrowable - the Throwable object.
    • warn Link icon

      void warn(String aMessage, Object aParameter)
      Records a warning message and an associated parameter object.
      Parameters:
      aMessage - the formatted message.
      aParameter - a parameter that can be referenced by the message
    • warn Link icon

      default void warn(String aMessage, Object... aParameters)
      Records a warning message and the associated parameters.
      Parameters:
      aMessage - the formatted message.
      aParameters - the parameters that can be referenced by the message
      Since:
      2019.1
    • warn Link icon

      void warn(String aMessage, Object aParameter, Throwable aThrowable)
      Records a warning message, an associated parameter and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aParameter - a parameter that can be referenced by the message
      aThrowable - the associated Throwable.
    • warn Link icon

      default void warn(String aMessage, Throwable aThrowable, Object... aParameters)
      Records a warning message, the associated parameters and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aThrowable - the associated Throwable.
      aParameters - the parameters that can be referenced by the message
      Since:
      2019.1
    • isErrorEnabled Link icon

      boolean isErrorEnabled()
      Returns true if error messages are logged.
      Returns:
      true if error messages are logged, false otherwise.
    • error Link icon

      default void error(Supplier<String> aMessageSupplier)
      Records an error message supplier, which is only evaluated when error messages are enabled. This method can be used to remove the overhead of generating a message (for example String concatenation) when messages will not actually be logged.
      Parameters:
      aMessageSupplier - A function, which when called, produces the desired log message
      Since:
      2017.0
    • error Link icon

      void error(String aMessage)
      Records an error message.
      Parameters:
      aMessage - the formatted message.
    • error Link icon

      default void error(Supplier<String> aMessageSupplier, Throwable aThrowable)
      Records a Throwable object and an error message supplier, which is only evaluated when error messages are enabled. This method can be used to remove the overhead of generating a message (for example String concatenation) when messages will not actually be logged.
      Parameters:
      aMessageSupplier - A function, which when called, produces the desired log formatted message.
      aThrowable - the Throwable object.
      Since:
      2017.0
    • error Link icon

      void error(String aMessage, Throwable aThrowable)
      Records an error message and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aThrowable - the Throwable object.
    • error Link icon

      void error(String aMessage, Object aParameter)
      Records an error message and an associated parameter object.
      Parameters:
      aMessage - the formatted message.
      aParameter - a parameter that can be referenced by the message
    • error Link icon

      default void error(String aMessage, Object... aParameters)
      Records an error message and the associated parameters.
      Parameters:
      aMessage - the formatted message.
      aParameters - the parameters that can be referenced by the message
      Since:
      2019.1
    • error Link icon

      void error(String aMessage, Object aParameter, Throwable aThrowable)
      Records an error message, an associated parameter and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aParameter - a parameter that can be referenced by the message
      aThrowable - the associated Throwable.
    • error Link icon

      default void error(String aMessage, Throwable aThrowable, Object... aParameters)
      Records an error message, the associated parameters and a Throwable object.
      Parameters:
      aMessage - the formatted message.
      aThrowable - the associated Throwable.
      aParameters - the parameters that can be referenced by the message
      Since:
      2019.1