Anvil | Smiths Smiths | Register Register | Login Login |
Search:
Show links Show tools Show tree | Previous document Next document | njet.org > Anvil > Documentation > Configuration > Providers > BasicLogDevice

anvil.server.basic.BasicLogDevice

BasicLogDevice uses BasicLogLayout to format the logged messages.

See also logging.

Attributes
name default description
format basic Class name of log format provider implementing anvil.LogLayout or ``basic´´ for anvil.server.basic.BasicLogLayout.
formatting See below *

String containing place holders for information related to message. Place holder is name inside curly braces. Backslash is used to escape the following character, and to generated tabs (\t), line feeds (\r and \n), and backslash itself (\\).

Place holders:
ms
Number of milliseconds elapsed since start of server.
time
Current time of day (hh:mm:ss)
date
Current date (yyyy-mm-dd)
thread
Name of thread emitting the log message.
severity
Severity of message (Emergency, Alert, Critical, Error, Warning, Notice, Info, Debug).
zone
Name of zone emitting the message.
message
Actual message to be emitted.
exception
Related exception, if any. Exception string has several lines in it, and always ends to line feed.

*) Default format: {date}\t{time}\t{thread}\t\t{message}\\n{exception}

Example:

  logging:
    provider  = anvil.server.basic.BasicLogDevice
    target    = /tmp/anvil.log
    format    = basic
    formating = {ms}\t{date}\t{time}\t{message}\n{exception}
  end

See also  | Providers
What's new | Anvil