-
Notifications
You must be signed in to change notification settings - Fork 107
new logging system for metrictank #624
Comments
I suspect that Peter's issue is that the only way to configure glog is via flag variables and there is no control over modifying the msg format. But i dont think that is an issue for us, and if it is we can easily fork the library. So i still really like golang/glog. with the exception of formating (which we can address by making it a coding standard that we all adhere to.) glog does everything we want.
|
It would be nice to invoke an API command to turn on/off certain logging aspects. This one for me is spamming 100s of thousands per day due to docker container churn.
However the metric is useful and you may not want to drop to debug to see it. |
I think an important feature would be not evaluating log statements that aren't going to be printed. By the nature of logging, most statements are NOT printed (for instance, debug/trace level is the most verbose, yet normally turned off). Being faster in the negative case is likely more important that being faster in the positive case. |
we've decided to standardize all our software on https://github.com/sirupsen/logrus |
as of #823/#825, the logger was created before flags were parsed and the config (file and env vars) were loaded. so the logger would always get the default value for the flag and no way to change the level.. I tried creating the logger after flag parsing, and adjusting the log level after config parsing, but couldn't the second step to work properly. Simplest solution is to just print to stderr directly the one time we actually need it in between the two steps. PS: I hate this logging library, but we'll get rid of it. see #624
currently we use github.com/raintank/worldping-api/pkg/log which is unmaintained and whose output is hard to parse programatically
here's what I want out of a new log system:
so I'm thinking something like:
a list of some interesting libraries, and any comments:
(barely scratching the surface here, there's much more to explore)
go-kit/log
https://github.com/go-kit/kit/tree/master/log
needs more investigation
github.com/kr/logfmt
github.com/golang/glog
awoods like this library because:
BUT:
note that peter is very well respected in the go community, he knows what he's talking about. but in my opinion his advice can be a bit quixotic. but an interesting data point.
The text was updated successfully, but these errors were encountered: