-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging Framework? #23
Comments
As mentioned in #23, we do not use any logging framework at all. This was fine for getting the exporter startet. However, with inreasing load the logging must be configureable. This PR is a start to replace all instances of "log.Printf" with the zap logger. The current configuration parameters are the log level and the log format (console, json). We might expose the log configuration to the config file. But I think this is overkill for the current state of the exporter.
Hey, until now the logging was fine for me. Sure, with increasing load the current logging is sub optimal. I created a PR (#24 ) to introduce https://go.uber.org/zap as the logging library. I welcome feedback. The current log settings exposed to the user are the level (debug, info, warning, error, panic) with the default "info". The format can be choosen between "console":
and "json":
|
Moreover, if you are able to speak about your project, I really like to hear about the cool problems people solve with this exporter. |
Implemented in Release v0.1.4. |
Hey,
many thanks for this cool project! Will use it in a new project, where there will be a very huge amount of telemetry reports translated into Prometheus. Right now every message will generate a single log line, as shown here: https://github.com/hikhvar/mqtt2prometheus/blob/master/pkg/metrics/ingest.go#L130
I don't suppose there is a way to configure a less verbose logging level? If not, any plans to add some sort of basic logging framework?
The text was updated successfully, but these errors were encountered: