1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

Replace option "debug" with "level" in "logging"

This commit is contained in:
Unrud 2018-08-16 08:00:02 +02:00
parent a5fa35e785
commit 59f7104dce
5 changed files with 29 additions and 18 deletions

View file

@ -49,6 +49,12 @@ def positive_float(value):
return value
def logging_level(value):
if value not in ("debug", "info", "warning", "error", "critical"):
raise ValueError("unsupported level: %s" % value)
return value
# Default configuration
INITIAL_CONFIG = OrderedDict([
("server", OrderedDict([
@ -173,11 +179,10 @@ INITIAL_CONFIG = OrderedDict([
"type": str,
"internal": web.INTERNAL_TYPES})])),
("logging", OrderedDict([
("debug", {
"value": "False",
"help": "print debug information",
"aliases": ["-D", "--debug"],
"type": bool}),
("level", {
"value": "warning",
"help": "threshold for the logger",
"type": logging_level}),
("mask_passwords", {
"value": "True",
"help": "mask passwords in logs",