Skip to content
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

feat: add flags to write json logs, to set log level #125

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

burningalchemist
Copy link
Owner

@burningalchemist burningalchemist commented Aug 4, 2022

These flags refer to go-kit/log, which seems to become our replacement for klog.

  • -log.json - to write logs in JSON instead of logfmt;
  • -log.level - to set log level (currently debug by default, as we use klog-gokit bridge).

@burningalchemist burningalchemist merged commit 91f5748 into master Aug 4, 2022
@burningalchemist burningalchemist deleted the logsettings branch August 4, 2022 13:36
@jakob-reesalu
Copy link

@burningalchemist Something wrong here, when trying to set log level:
.\sql_exporter.exe -log.level debug

I get this:
flag provided but not defined: -log

@burningalchemist
Copy link
Owner Author

Hey @jakob-reesalu, it seems that the dot character is omitted as it might be intercepted by the interpreter on Windows. Are you running the command from CMD or from Powershell? Could you try to write the flag with double dash in front like --log.level?

@jakob-reesalu
Copy link

Oh, that worked! Great! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants