Last active
August 23, 2018 01:46
-
-
Save evertlammerts/96b4d9ecc3c71cd79bdf08e39736841a to your computer and use it in GitHub Desktop.
JSON schema v4 for Python's logging.config.dictConfig: https://docs.python.org/3/library/logging.config.html#logging-config-dictschema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "JSON schema for Python logging.config.dictConfig", | |
"type": "object", | |
"required": ["version"], | |
"properties": { | |
"version": {"type": "integer", "enum": [1]}, | |
"formatters": { | |
"type": "object", | |
"patternProperties": { | |
"^[a-zA-Z0-9._-]+$": { | |
"type": "object", | |
"properties": { | |
"format": {"type": "string"}, | |
"datefmt": {"type": "string"} | |
}, | |
"additionalProperties": false | |
} | |
} | |
}, | |
"filters": { | |
"type": "object", | |
"patternProperties": { | |
"^[a-zA-Z0-9._-]+$": { | |
"type": "object", | |
"properties": { | |
"name": {"type": "string"} | |
}, | |
"additionalProperties": false | |
} | |
} | |
}, | |
"handlers": { | |
"type": "object", | |
"patternProperties": { | |
"^[a-zA-Z0-9._-]+$": { | |
"type": "object", | |
"required": ["class"], | |
"properties": { | |
"class": {"type": "string"}, | |
"level": {"type": "string"}, | |
"formatter": {"type": "string"}, | |
"filters": { | |
"type": "array", | |
"items": {"type": "string"}, | |
"uniqueItems": true | |
} | |
} | |
} | |
} | |
}, | |
"loggers": { | |
"type": "object", | |
"patternProperties": { | |
"^[a-zA-Z0-9._-]+$": { | |
"type": "object", | |
"properties": { | |
"level": {"type": "string"}, | |
"propagate": {"type": "boolean"}, | |
"filters": { | |
"type": "array", | |
"items": {"type": "string"}, | |
"uniqueItems": true | |
}, | |
"handlers": { | |
"type": "array", | |
"items": {"type": "string"}, | |
"uniqueItems": true | |
} | |
} | |
} | |
} | |
}, | |
"root": { | |
"type": "object", | |
"properties": { | |
"level": { | |
"type": "string", | |
"enum": [ "CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG" ] | |
}, | |
"filters": { | |
"type": "array", | |
"items": {"type": "string"}, | |
"uniqueItems": true | |
}, | |
"handlers": { | |
"type": "array", | |
"items": {"type": "string"}, | |
"uniqueItems": true | |
} | |
} | |
}, | |
"incremental": {"type": "boolean"}, | |
"disable_existing_loggers": {"type": "boolean"} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
suggest adding to
formaters
to support formatting other than%
: