log package:rio
Log a debug level message with no source.
Log a debug level message with the given source.
Log an error level message with no source.
Log an error level message with the given source.
What accent colors, indexed by
Int, is the log func configured
to use?
Intended for use by code which wants to optionally add additional
color to its log messages.
What color is the log func configured to use for each
LogLevel?
Intended for use by code which wants to optionally add additional
color to its log messages.
What color is the log func configured to use for secondary content?
Intended for use by code which wants to optionally add additional
color to its log messages.
Is the log func configured to use color output?
Intended for use by code which wants to optionally add additional
color to its log messages.
Generic, basic function for creating other logging functions.
Log an info level message with no source.
Log an info level message with the given source.
Create a
LogOptions value from the given
Handle and
whether to perform verbose logging or not. Individiual settings can be
overridden using appropriate
set functions. Logging output is
guaranteed to be non-interleaved only for a UTF-8
Handle in a
multi-thread environment.
When Verbose Flag is
True, the following happens:
- setLogVerboseFormat is called with True
- setLogUseColor is called with True (except on
Windows)
- setLogUseLoc is called with True
- setLogUseTime is called with True
- setLogMinLevel is called with Debug log
level
Create a
LogOptions value which will store its data in memory.
This is primarily intended for testing purposes. This will return both
a
LogOptions value and an
IORef containing the resulting
Builder value.
This will default to non-verbose settings and assume there is a
terminal attached. These assumptions can be overridden using the
appropriate
set functions.
Log a message with the specified textual level and no source.
Log a message with the specified textual level and the given source.
Write a "sticky" line to the terminal. Any subsequent lines will
overwrite this one, and that same line will be repeated below again.
In other words, the line sticks at the bottom of the output forever.
Running this function again will replace the sticky line with a new
sticky line. When you want to get rid of the sticky line, run
logStickyDone.
Note that not all
LogFunc implementations will support sticky
messages as described. However, the
withLogFunc implementation
provided by this module does.
This will print out the given message with a newline and disable any
further stickiness of the line until a new call to
logSticky
happens.
Log a warn level message with no source.
Log a warn level message with the given source.
A logging function, wrapped in a newtype for better error messages.
An implementation may choose any behavior of this value it wishes,
including printing to standard output or no action at all.
The log level of a message.
Configuration for how to create a
LogFunc. Intended to be used
with the
withLogFunc function.