go-logging icon indicating copy to clipboard operation
go-logging copied to clipboard

RFC: Fine, Finer, Finest?

Open alecthomas opened this issue 11 years ago • 2 comments

log4j and log4go both provide these extra levels below Debug. It adds nice granularity to debugging logs, as opposed to the single Debug all -or-nothing. I personally like it, and would write a patch for it, but not if you're not interested in merging.

alecthomas avatar Jul 10 '14 04:07 alecthomas

Good question. I do think it sounds like a nice thing to have but in practice I'm pretty sure no-one is going to use them all. Especially not in a consistent way. However I don't like the names.

I've been wanting to add Trace and have been thinking about Verbose. I believe it's more common to have Verbose as an additional level and I like it more.

An alternative approach would be to add something similar to what Glog have. That's even more flexible and you're free to internally call the verbosity levels whatever. Could this be of interest? This path is what I would take.

op avatar Jul 10 '14 07:07 op

The loggers I've seen at the Golang projects wiki (https://code.google.com/p/go-wiki/wiki/Projects) support Trace.

I don't understand why Glog has log severity AND verbosity level. For me, the point of log severity is to manage verbosity level.

jaekwon avatar Jul 14 '14 23:07 jaekwon