Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
event :: Rope -> Program τ () Source #
Note a significant event, state transition, status, or debugging message. This:
event
"Starting..."
will result in
13:05:55Z (0000.001) Starting...
appearing on stdout and the message being sent down the logging channel. The output string is current time in UTC, and time elapsed since startup shown to the nearest millisecond (our timestamps are to nanosecond precision, but you don't need that kind of resolution in in ordinary debugging).
Messages sent to syslog will be logged at Info
level severity.
debug :: Rope -> Rope -> Program τ () Source #
Output a debugging message formed from a label and a value. This is like
event
above but for the (rather common) case of needing to inspect or
record the value of a variable when debugging code. This:
setProgramName
"hello" name <-getProgramName
debug
"programName" name
will result in
13:05:58Z (0003.141) programName = hello
appearing on stdout and the message being sent down the logging channel, assuming these actions executed about three seconds after program start.
Messages sent to syslog will be logged at Debug
level severity.
debugS :: Show α => Rope -> α -> Program τ () Source #
Convenience for the common case of needing to inspect the value
of a general variable which has a Show
instance
debugR :: Render α => Rope -> α -> Program τ () Source #
Convenience for the common case of needing to inspect the value of a
general variable for which there is a Render
instance and so can pretty
print the supplied argument to the log. This will pass the detected
terminal width to the render
function, resulting in appopriate line
wrapping when rendering your value (if logging to something other than
console the default width of 80
will be applied).