Class Log

A log4j like logger instance. To obtain such an instance, use the Logger.getRootLogger() or Logger.getLogger(String) or Logger.getLogger(String, String) methods.

Property Summary 

PropertyDescription
NDC: LogNDC (read-only)Returns the Nested Diagnostic Context for this script call.
debugEnabled: Boolean (read-only)This method returns true if debug logging is enabled for this logging instance.
errorEnabled: Boolean (read-only)This method returns true if error logging is enabled for this logging instance.
infoEnabled: Boolean (read-only)This method returns true if information logging is enabled for this logging instance.
warnEnabled: Boolean (read-only)This method returns true if warning logging is enabled for this logging instance.

Constructor Summary 

This class does not have a constructor, so you cannot create it directly.

Method Summary 

MethodDescription
debug(String, Object…)The method reports an debug level message.
error(String, Object…)The method reports an error level message.
fatal(String, Object…)The method reports an warning level message.
static getNDC()Returns the Nested Diagnostic Context for this script call.
info(String, Object…)The method reports an information level message.
isDebugEnabled()This method returns true if debug logging is enabled for this logging instance.
isErrorEnabled()This method returns true if error logging is enabled for this logging instance.
isInfoEnabled()This method returns true if information logging is enabled for this logging instance.
isWarnEnabled()This method returns true if warning logging is enabled for this logging instance.
warn(String, Object…)The method reports an warning level message.

Methods inherited from class Object 

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Property Details 

NDC 

NDC: LogNDC (read-only)

Returns the Nested Diagnostic Context for this script call.


debugEnabled 

debugEnabled: Boolean (read-only)

This method returns true if debug logging is enabled for this logging instance.


errorEnabled 

errorEnabled: Boolean (read-only)

This method returns true if error logging is enabled for this logging instance.


infoEnabled 

infoEnabled: Boolean (read-only)

This method returns true if information logging is enabled for this logging instance.


warnEnabled 

warnEnabled: Boolean (read-only)

This method returns true if warning logging is enabled for this logging instance.


Method Details 

debug(String, Object...) 

debug(msg: String, args: Object...): void

The method reports an debug level message. Arguments can be embedded into the message, e.g. like "Failure {0} in {1}". The method implements the Java MessageFormat.format() syntax.

Parameters:

  • msg - the message to log.
  • args - the arguments to insert into the message.

error(String, Object...) 

error(msg: String, args: Object...): void

The method reports an error level message. Arguments can be embedded into the message, e.g. like "Failure {0} in {1}". The method implements the Java MessageFormat.format() syntax.

Parameters:

  • msg - the message to log.
  • args - the arguments to insert into the message.

fatal(String, Object...) 

fatal(msg: String, args: Object...): void

The method reports an warning level message. Arguments can be embedded into the message, e.g. like "Failure {0} in {1}". The method implements the Java MessageFormat.format() syntax. Note: Fatal log messages are always enabled and optionally send via E-Mail.

Parameters:

  • msg - the message to log.
  • args - the arguments to insert into the message.

getNDC() 

static getNDC(): LogNDC

Returns the Nested Diagnostic Context for this script call.

Returns:

  • the nested diagnostic context

info(String, Object...) 

info(msg: String, args: Object...): void

The method reports an information level message. Arguments can be embedded into the message, e.g. like "Failure {0} in {1}". The method implements the Java MessageFormat.format() syntax.

Parameters:

  • msg - the message to log.
  • args - the arguments to insert into the message.

isDebugEnabled() 

isDebugEnabled(): Boolean

This method returns true if debug logging is enabled for this logging instance.

Returns:

  • true if logging of debug messages is enabled, false otherwise.

isErrorEnabled() 

isErrorEnabled(): Boolean

This method returns true if error logging is enabled for this logging instance.

Returns:

  • true if logging of error messages is enabled, false otherwise.

isInfoEnabled() 

isInfoEnabled(): Boolean

This method returns true if information logging is enabled for this logging instance.

Returns:

  • true if logging of information messages is enabled, false otherwise.

isWarnEnabled() 

isWarnEnabled(): Boolean

This method returns true if warning logging is enabled for this logging instance.

Returns:

  • true if logging of warning messages is enabled, false otherwise.

warn(String, Object...) 

warn(msg: String, args: Object...): void

The method reports an warning level message. Arguments can be embedded into the message, e.g. like "Failure {0} in {1}". The method implements the Java MessageFormat.format() syntax.

Parameters:

  • msg - the message to log.
  • args - the arguments to insert into the message.