java.lang.Object
org.openhab.core.model.script.actions.Log

public class Log extends Object
The static methods of this class are made available as functions in the scripts. This allows a script to log to the SLF4J-Log.
Author:
Thomas Eichstaedt-Engelen - Initial contribution
  • Constructor Summary

    Constructors
    Constructor
    Description
    Log()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    logDebug(String loggerName, String format, Object... args)
    Creates the Log-Entry format with level DEBUG and logs under the loggers name org.openhab.core.model.script.<loggerName>
    static void
    logError(String loggerName, String format, Object... args)
    Creates the Log-Entry format with level ERROR and logs under the loggers name org.openhab.core.model.script.<loggerName>
    static void
    logInfo(String loggerName, String format, Object... args)
    Creates the Log-Entry format with level INFO and logs under the loggers name org.openhab.core.model.script.<loggerName>
    static void
    logWarn(String loggerName, String format, Object... args)
    Creates the Log-Entry format with level WARN and logs under the loggers name org.openhab.core.model.script.<loggerName>

    Methods inherited from class java.lang.Object

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

    • Log

      public Log()
  • Method Details

    • logDebug

      public static void logDebug(String loggerName, String format, Object... args)
      Creates the Log-Entry format with level DEBUG and logs under the loggers name org.openhab.core.model.script.<loggerName>
      Parameters:
      loggerName - the name of the Logger which is prefixed with org.openhab.core.model.script.
      format - the Log-Statement which can contain placeholders '{}'
      args - the arguments to replace the placeholders contained in format
      See Also:
      • Logger
    • logInfo

      public static void logInfo(String loggerName, String format, Object... args)
      Creates the Log-Entry format with level INFO and logs under the loggers name org.openhab.core.model.script.<loggerName>
      Parameters:
      loggerName - the name of the Logger which is prefixed with org.openhab.core.model.script.
      format - the Log-Statement which can contain placeholders '{}'
      args - the arguments to replace the placeholders contained in format
      See Also:
      • Logger
    • logWarn

      public static void logWarn(String loggerName, String format, Object... args)
      Creates the Log-Entry format with level WARN and logs under the loggers name org.openhab.core.model.script.<loggerName>
      Parameters:
      loggerName - the name of the Logger which is prefixed with org.openhab.core.model.script.
      format - the Log-Statement which can contain placeholders '{}'
      args - the arguments to replace the placeholders contained in format
      See Also:
      • Logger
    • logError

      public static void logError(String loggerName, String format, Object... args)
      Creates the Log-Entry format with level ERROR and logs under the loggers name org.openhab.core.model.script.<loggerName>
      Parameters:
      loggerName - the name of the Logger which is prefixed with org.openhab.core.model.script.
      format - the Log-Statement which can contain placeholders '{}'
      args - the arguments to replace the placeholders contained in format
      See Also:
      • Logger