Skip to content

add configurable log format and level#822

Merged
levkk merged 1 commit intopgdogdev:mainfrom
levish0:json-logging
Mar 12, 2026
Merged

add configurable log format and level#822
levkk merged 1 commit intopgdogdev:mainfrom
levish0:json-logging

Conversation

@levish0
Copy link
Contributor

@levish0 levish0 commented Mar 12, 2026

Related to #815

Adds configurable logging output via general.log_format and general.log_level.

  • add log_format with text and json modes
  • add log_level using RUST_LOG compatible filter syntax
  • initialize logging from config during startup
  • update example.pgdog.toml and generated JSON schema

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 52.33645% with 51 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pgdog/src/main.rs 30.30% 23 Missing ⚠️
pgdog/src/lib.rs 51.11% 22 Missing ⚠️
pgdog-config/src/general.rs 79.31% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@levkk levkk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Reading the config twice is probably necessary here, since we also want to log config loading errors. Catch-22!

Thanks for the PR.

@levkk levkk merged commit f228a79 into pgdogdev:main Mar 12, 2026
13 of 14 checks passed
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.

2 participants