We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Service not honoring --log.format flag
To reproduce Steps to reproduce the behavior: Using docker compose:
version: '3.9' services: nginx-exporter: image: nginx/nginx-prometheus-exporter:edge # image: nginx/nginx-prometheus-exporter:latest container_name: nginx-exporter hostname: nginx-exporter restart: always labels: - prometheus_job=nginx - prometheus_metrics_port=9113 # - prometheus_metrics_path=/metrics command: - '--nginx.scrape-uri=http://nginx:81/nginx_status' - '--log.level=info' - '--log.format=json' networks: - mainnet # ports: # - 9113:9113
Logs are showing as:
level=info ts=2023-10-17T12:53:40.498Z caller=exporter.go:118 msg="Starting nginx-prometheus-exporter" version="(version=edge, branch=main, revision=b342fe37626c8c44df0543f1b619aec8272efb10)" level=info ts=2023-10-17T12:53:40.498Z caller=exporter.go:119 msg="Build context" build_context="(go=go1.19.13, platform=linux/amd64, user=goreleaser, date=2023-10-12T10:10:21Z, tags=unknown)" level=info ts=2023-10-17T12:53:40.498Z caller=tls_config.go:274 msg="Listening on" address=[::]:9113 level=info ts=2023-10-17T12:53:40.498Z caller=tls_config.go:277 msg="TLS is disabled." http2=false address=[::]:9113
Expected behavior
Logs should be json, and not logfmt.
Your environment
The text was updated successfully, but these errors were encountered:
Thanks @fede843 for catching this! I've opened a PR to fix it.
Sorry, something went wrong.
Thank you!
Successfully merging a pull request may close this issue.
Describe the bug
Service not honoring --log.format flag
To reproduce
Steps to reproduce the behavior:
Using docker compose:
Logs are showing as:
Expected behavior
Logs should be json, and not logfmt.
Your environment
The text was updated successfully, but these errors were encountered: