iamseth / oracledb_exporter

Prometheus Oracle database exporter.
MIT License
489 stars 236 forks source link

BUG: Structured logging in Golang #262

Open vutkin opened 1 year ago

vutkin commented 1 year ago

Hi @Yannig, you did a PR where logger was changed: https://github.com/iamseth/oracledb_exporter/pull/243/files Old logs looks like:

image

New implementation in latest build:

image

Please note that all logs lack of whitespaces

Screenshot 2022-12-23 at 15 51 50

I suggest to use json formatted log in PRODUCTION profile and switch to most popular top go loggers. I like https://github.com/sirupsen/logrus.

TIA, Regards, Viktor.

Yannig commented 1 year ago

Hi @vutkin

Do you think we can close this issue?

Regards

vutkin commented 1 year ago

Now latest release looks good, if don't need structured logs in json, so make sense to close it.

Yannig commented 1 year ago

In fact, it can make sense to have a JSON output.

Yannig commented 1 year ago

I let this issue open for the moment and I will try to improve logger if I have time.