co-log-core icon indicating copy to clipboard operation
co-log-core copied to clipboard

Severity Trace

Open michaelpj opened this issue 1 year ago • 1 comments

It's not uncommon for logging systems to have a level below Debug, often called Trace. I do find this useful: often there's a distinction between "debugging information that's not useful during normal operation" (Debug) and "just vomit out everything" (Trace).

michaelpj avatar Aug 27 '23 10:08 michaelpj

You are right, most common logging frameworks provide such a distinction (and also a level like critical/fatal on the other side of the scale). However I really like the clear differentiation of a minimal set of severities. So personally I'm undecided if we should add one or consequently two new severities to the core framework.

Con:

  • Leave log levels simple, clear and distinguishable
  • No change 😄
  • Really easy to add this extension on app-level in conjunction with co-log (https://github.com/co-log/co-log/blob/f7049209d1c50f0544f864adda187c9d52c1baac/src/Colog/Message.hs#L107) - so at least it isn't a real blocker if this isn't included in the core framework

Pro:

  • Following standards - most other frameworks provide a level below debug and above error (e.g. https://logging.apache.org/log4j/2.x/javadoc/log4j-api/index.html or https://learn.microsoft.com/de-de/dotnet/api/microsoft.extensions.logging.loglevel?view=dotnet-plat-ext-7.0)

@vrom911 - your thoughts?

alaendle avatar Aug 27 '23 12:08 alaendle