log package:hledger-web
Generates a function that takes a
Text and logs a
LevelDebug message. Usage:
$(logDebug) "This is a debug log message"
Generates a function that takes a
LogSource and
Text and
logs a
LevelDebug message. Usage:
$logDebugS "SomeSource" "This is a debug log message"
Generates a function that takes a
Text and logs a
LevelOther message. Usage:
$(logOther "My new level") "This is a log message"
Generates a function that takes a
LogSource, a level name and a
Text and logs a
LevelOther message. Usage:
$logOtherS "SomeSource" "My new level" "This is a log message"
A Monad which has the ability to log messages in some manner.
Default implementation of
makeLogger. Sends to stdout and
automatically flushes on each write.
Since 1.4.10
All of the default middlewares, excluding logging.
Since 1.2.12
Default implementation of
shouldLog. Logs everything at or
above
LevelInfo.
Since 1.4.10
Default formatting for log messages. When you use the template haskell
logging functions for to log with information about the source
location, that information will be appended to the end of the log.
When you use the non-TH logging functions, like logDebugN,
this function does not include source information. This currently
works by checking to see if the package name is the string
"<unknown>". This is a hack, but it removes some of the visual
clutter from non-TH logs.
Since 1.4.10
Creates a
Logger to use for log messages.
Note that a common technique (endorsed by the scaffolding) is to
create a
Logger value and place it in your foundation
datatype, and have this method return that already created value. That
way, you can use that same
Logger for printing messages
during app initialization.
Default: the
defaultMakeLogger function.
Should we log the given log source/level combination.
Default: the
defaultShouldLogIO function.
Since 1.2.4