Log severity as a special field Lassi Kortela (29 Dec 2020 20:52 UTC)
Re: Log severity as a special field Arthur A. Gleckler (30 Dec 2020 03:09 UTC)
Re: Log severity as a special field Göran Weinholt (31 Dec 2020 13:40 UTC)
Re: Log severity as a special field Arthur A. Gleckler (31 Dec 2020 17:21 UTC)
Re: Log severity as a special field Göran Weinholt (31 Dec 2020 13:25 UTC)

Log severity as a special field Lassi Kortela 29 Dec 2020 20:52 UTC

SRFI 215 wisely constructs log entries from arbitrary key-value pairs.
The severity level is the only exception to this rule.

My intuition says it may not be that simple to work things out in a big
system such that severity is the only by which you'd like to filter logs
at compile time. And it may not be simple to have a universal severity
scale that is respected by every part of the program (including
third-party libraries).

If the main point of severity is to have a sliding scale on which
logging verbosity can be controlled at runtime, wouldn't it be equally
simple and more future-proof to let programmers add mixins to the log
callback to filter which entries are logged?

If the point is to enable compile-time macros that can leave verbose
messages off the build product altogether, could identifiers be used for
that purpose? It would enable finer-grained control than one global log
level.