java.lang.Object
de.oktoflow.platform.support.logging.slf4j.simple.Slf4jLogger
All Implemented Interfaces:
de.iip_ecosphere.platform.support.logging.Logger

public class Slf4jLogger extends Object implements de.iip_ecosphere.platform.support.logging.Logger
Delegating SLF4j logger.
Author:
Holger Eichelberger, SSE
  • Field Details

    • logger

      private org.slf4j.Logger logger
    • level

      private de.iip_ecosphere.platform.support.logging.LogLevel level
  • Constructor Details

    • Slf4jLogger

      public Slf4jLogger(org.slf4j.Logger logger)
      Creates a wrapping logger.
      Parameters:
      logger - the original logger
  • Method Details

    • setLevel

      public boolean setLevel(de.iip_ecosphere.platform.support.logging.LogLevel level)
      Specified by:
      setLevel in interface de.iip_ecosphere.platform.support.logging.Logger
    • getLevel

      public de.iip_ecosphere.platform.support.logging.LogLevel getLevel()
      Specified by:
      getLevel in interface de.iip_ecosphere.platform.support.logging.Logger
    • getName

      public String getName()
      Specified by:
      getName in interface de.iip_ecosphere.platform.support.logging.Logger
    • ifEnabled

      private void ifEnabled(de.iip_ecosphere.platform.support.logging.LogLevel level, Runnable func)
      Execute func if the given level is enabled.
      Parameters:
      level - the target logging level
      func - the function to execute
    • trace

      public void trace(String msg)
      Specified by:
      trace in interface de.iip_ecosphere.platform.support.logging.Logger
    • trace

      public void trace(String format, Object arg)
      Specified by:
      trace in interface de.iip_ecosphere.platform.support.logging.Logger
    • trace

      public void trace(String format, Object arg1, Object arg2)
      Specified by:
      trace in interface de.iip_ecosphere.platform.support.logging.Logger
    • trace

      public void trace(String format, Object... arguments)
      Specified by:
      trace in interface de.iip_ecosphere.platform.support.logging.Logger
    • trace

      public void trace(String msg, Throwable th)
      Specified by:
      trace in interface de.iip_ecosphere.platform.support.logging.Logger
    • debug

      public void debug(String msg)
      Specified by:
      debug in interface de.iip_ecosphere.platform.support.logging.Logger
    • debug

      public void debug(String format, Object arg)
      Specified by:
      debug in interface de.iip_ecosphere.platform.support.logging.Logger
    • debug

      public void debug(String format, Object arg1, Object arg2)
      Specified by:
      debug in interface de.iip_ecosphere.platform.support.logging.Logger
    • debug

      public void debug(String format, Object... arguments)
      Specified by:
      debug in interface de.iip_ecosphere.platform.support.logging.Logger
    • debug

      public void debug(String msg, Throwable th)
      Specified by:
      debug in interface de.iip_ecosphere.platform.support.logging.Logger
    • info

      public void info(String msg)
      Specified by:
      info in interface de.iip_ecosphere.platform.support.logging.Logger
    • info

      public void info(String format, Object arg)
      Specified by:
      info in interface de.iip_ecosphere.platform.support.logging.Logger
    • info

      public void info(String format, Object arg1, Object arg2)
      Specified by:
      info in interface de.iip_ecosphere.platform.support.logging.Logger
    • info

      public void info(String format, Object... arguments)
      Specified by:
      info in interface de.iip_ecosphere.platform.support.logging.Logger
    • info

      public void info(String msg, Throwable th)
      Specified by:
      info in interface de.iip_ecosphere.platform.support.logging.Logger
    • warn

      public void warn(String msg)
      Specified by:
      warn in interface de.iip_ecosphere.platform.support.logging.Logger
    • warn

      public void warn(String format, Object arg)
      Specified by:
      warn in interface de.iip_ecosphere.platform.support.logging.Logger
    • warn

      public void warn(String format, Object arg1, Object arg2)
      Specified by:
      warn in interface de.iip_ecosphere.platform.support.logging.Logger
    • warn

      public void warn(String format, Object... arguments)
      Specified by:
      warn in interface de.iip_ecosphere.platform.support.logging.Logger
    • warn

      public void warn(String msg, Throwable th)
      Specified by:
      warn in interface de.iip_ecosphere.platform.support.logging.Logger
    • error

      public void error(String msg)
      Specified by:
      error in interface de.iip_ecosphere.platform.support.logging.Logger
    • error

      public void error(String format, Object arg)
      Specified by:
      error in interface de.iip_ecosphere.platform.support.logging.Logger
    • error

      public void error(String format, Object arg1, Object arg2)
      Specified by:
      error in interface de.iip_ecosphere.platform.support.logging.Logger
    • error

      public void error(String format, Object... arguments)
      Specified by:
      error in interface de.iip_ecosphere.platform.support.logging.Logger
    • error

      public void error(String msg, Throwable th)
      Specified by:
      error in interface de.iip_ecosphere.platform.support.logging.Logger