updated formatter dependencies
added first work on logformats
added Contribution Guidelines
Your silver bullet logging solution. Because that is definitely what the world needed: another logging library.
gLog supports the following features:
The output follows this structure:
%level:\t%time – %caller – …
%level
is coloured by default when logging to stdout or stderr.
It can be enabled and disabled at will.
%time
is in the ISO-8601 format working with nanosecond precision
(if supported)
%caller
is the name (format: package.function
) of the
function that is logging the message. By default, this does not
happen for INFO
and WARNING
.
–
and not -
I decided to use U+2013 (EN DASH) over a normal U+002D (HYPHEN-MINUS) due to multiple reasons; some of which are:
2D
is not at all unlikely to appear in a log-messagecut
or awk
Level | Description |
---|---|
TRACE | Print everything. This is usually not wanted unless debugging. |
DEBUG | Print every function call. |
INFO | Print general status messages like HTTP-Requests (a good default) |
WARNING | Handled errors. (the better default¹) |
ERROR | Non-Critical Errors like access denied |
FATAL | Errors that do not allow the Program to continue |
¹) "no news is good news" or so they say
You can find more information in this project's wiki
NO_COLOR
glog respects NO_COLOR
Contributions are welcome from anyone. Just send a patchset to ~poldi1405/patches@lists.sr.ht and wait for feedback. For general questions or other communications feel free to drop a message to ~poldi1405/discussion@lists.sr.ht
Updates will be announced here
The changelog can be found here
* the claim 0 external dependencies refers to 0 dependencies that have to be credited. By crediting this package, the crediting for the only external dependency is also fulfilled
© Moritz Poldrack and contributors
gLog is a gun unter the MPL-2.0
To learn more you may: