heavy-logger- Full-weight logging based on fast-logger
Safe HaskellNone



This module contains definitions for formatting log message to write it to output.

Log message format is defined by using text-format-heavy syntax. Variables available are:

  • level - message severity level. Variable format can be specified in form of selector[~convert], where:

    • selector is name for level name, value for level integer value, syslog for name of syslog equivalent of the level.
    • convert is u for upper case, l for lower case, t for title case (all words capitalized).

    Default format corresponds to name. For example, use {level:~l} to output level name in lower case.

  • source - message source (module name)
  • location - location from where message was logged (in form of (line, column)).
  • line - source file line number from where message was logged.
  • file - source file name from where message was logged.
  • package - name of the package from where message was logged.
  • time - message time
  • message - message string itself
  • fullcontext - full set of current context variable values, in name=value; name=value; form.
  • Also all variables from context are available.


defaultLogFormat :: Format Source #

Default log message format. Corresponds to: {time} [{level}] {source}: {message}\n

formatLogMessage :: Format -> LogMessage -> FormattedTime -> LogStr Source #

Format log message for output.

formatLogMessage' :: Format -> LogMessage -> FormattedTime -> Text Source #

Format log message for output.

Orphan instances

Formatable Level Source # 
Instance details