mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Implement validation of the log section (#2989)
Somehow it was always forgotten.
This commit is contained in:
@@ -937,6 +937,18 @@ validate_etcd = {
|
|||||||
schema = Schema({
|
schema = Schema({
|
||||||
"name": str,
|
"name": str,
|
||||||
"scope": str,
|
"scope": str,
|
||||||
|
Optional("log"): {
|
||||||
|
Optional("level"): EnumValidator(('DEBUG', 'INFO', 'WARN', 'WARNING', 'ERROR', 'FATAL', 'CRITICAL'),
|
||||||
|
case_sensitive=True, raise_assert=True),
|
||||||
|
Optional("traceback_level"): EnumValidator(('DEBUG', 'ERROR'), raise_assert=True),
|
||||||
|
Optional("format"): str,
|
||||||
|
Optional("dateformat"): str,
|
||||||
|
Optional("max_queue_size"): int,
|
||||||
|
Optional("dir"): str,
|
||||||
|
Optional("file_num"): int,
|
||||||
|
Optional("file_size"): int,
|
||||||
|
Optional("loggers"): dict
|
||||||
|
},
|
||||||
Optional("ctl"): {
|
Optional("ctl"): {
|
||||||
Optional("insecure"): bool,
|
Optional("insecure"): bool,
|
||||||
Optional("cacert"): str,
|
Optional("cacert"): str,
|
||||||
|
|||||||
@@ -13,6 +13,20 @@ available_dcs = [m.split(".")[-1] for m in dcs_modules()]
|
|||||||
config = {
|
config = {
|
||||||
"name": "string",
|
"name": "string",
|
||||||
"scope": "string",
|
"scope": "string",
|
||||||
|
"log": {
|
||||||
|
"level": "DEBUG",
|
||||||
|
"traceback_level": "DEBUG",
|
||||||
|
"format": "%(asctime)s %(levelname)s: %(message)s",
|
||||||
|
"dateformat": "%Y-%m-%d %H:%M:%S",
|
||||||
|
"max_queue_size": 100,
|
||||||
|
"dir": "/tmp",
|
||||||
|
"file_num": 10,
|
||||||
|
"file_size": 1000000,
|
||||||
|
"loggers": {
|
||||||
|
"patroni.postmaster": "WARNING",
|
||||||
|
"urllib3": "DEBUG"
|
||||||
|
}
|
||||||
|
},
|
||||||
"restapi": {
|
"restapi": {
|
||||||
"listen": "127.0.0.2:800",
|
"listen": "127.0.0.2:800",
|
||||||
"connect_address": "127.0.0.2:800",
|
"connect_address": "127.0.0.2:800",
|
||||||
|
|||||||
Reference in New Issue
Block a user