An object that sends log messages relating to a particular topic. A Logger instance for a Category may be obtained by invoking logger.

Logger log = logger(`module org.hibernate`);

Each Logger has a priority. Log messages with a priority lower than the current priority of the Logger will not be sent.

log.priority = warn;
log.info("hello"); //not sent
log.error("sos"); //sent
See also logger

no type hierarchy

no supertypes hierarchy

no subtypes hierarchy

Attributes
categorySource Codeshared formal Category category

The Category to which log messages sent by this Logger relate.

prioritySource Codeshared formal variable Priority priority

The current priority of this Logger. If not explicitly set, the default priority is used.

Inherited Attributes
Attributes inherited from: Object
Methods
debugSource Codeshared void debug(Message message, Throwable? throwable = null)

Send a debug log message.

Parameters:
  • throwable = null
enabledSource Codeshared Boolean enabled(Priority priority)

Determines if log messages with the given priority will be sent by this Logger. That is, if the given priority is at least as high as this Loggers current priority.

errorSource Codeshared void error(Message message, Throwable? throwable = null)

Send an error log message.

Parameters:
  • throwable = null
fatalSource Codeshared void fatal(Message message, Throwable? throwable = null)

Send a fatal log message.

Parameters:
  • throwable = null
infoSource Codeshared void info(Message message, Throwable? throwable = null)

Send an info log message.

Parameters:
  • throwable = null
logSource Codeshared formal void log(Priority priority, Message message, Throwable? throwable = null)

Send a log message with the given priority. Optionally, a throwable may be given.

Parameters:
  • throwable = null
renderSource Codeshared String render(Message message)

Evaluate the given message, producing a String.

traceSource Codeshared void trace(Message message, Throwable? throwable = null)

Send a trace log message.

Parameters:
  • throwable = null
warnSource Codeshared void warn(Message message, Throwable? throwable = null)

Send a warn log message.

Parameters:
  • throwable = null
Inherited Methods
Methods inherited from: Object
Nested Aliases
MessageSource Codeshared Message=> String|String()

A log message, which may be a string or an unevaluated string, represented by the function type String().