You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: .schema/pgdog.schema.json
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,8 @@
62
62
"load_schema": "auto",
63
63
"log_connections": true,
64
64
"log_disconnections": true,
65
+
"log_format": "text",
66
+
"log_level": "info",
65
67
"lsn_check_delay": 9223372036854775807,
66
68
"lsn_check_interval": 5000,
67
69
"lsn_check_timeout": 5000,
@@ -769,6 +771,16 @@
769
771
"type": "boolean",
770
772
"default": true
771
773
},
774
+
"log_format": {
775
+
"description": "Format to use for PgDog application logs.\n\n_Default:_ `text`\n\nhttps://docs.pgdog.dev/configuration/pgdog.toml/general/#log_format",
776
+
"$ref": "#/$defs/LogFormat",
777
+
"default": "text"
778
+
},
779
+
"log_level": {
780
+
"description": "Log filter directives using the same syntax as the `RUST_LOG` environment variable.\n\n_Default:_ `info`\n\nhttps://docs.pgdog.dev/configuration/pgdog.toml/general/#log_level",
781
+
"type": "string",
782
+
"default": "info"
783
+
},
772
784
"lsn_check_delay": {
773
785
"description": "For how long to delay checking for replication delay.\n\nhttps://docs.pgdog.dev/configuration/pgdog.toml/general/#lsn_check_delay",
774
786
"type": "integer",
@@ -1090,6 +1102,21 @@
1090
1102
}
1091
1103
]
1092
1104
},
1105
+
"LogFormat": {
1106
+
"description": "Format to use for PgDog application logs.",
1107
+
"oneOf": [
1108
+
{
1109
+
"description": "Human-readable text logs (default).",
1110
+
"type": "string",
1111
+
"const": "text"
1112
+
},
1113
+
{
1114
+
"description": "Structured JSON logs suitable for ECS/Datadog ingestion.",
1115
+
"type": "string",
1116
+
"const": "json"
1117
+
}
1118
+
]
1119
+
},
1093
1120
"ManualQuery": {
1094
1121
"description": "Queries with manual routing rules.",
0 commit comments