0.5.1-pre.005
This commit is contained in:
150
config/schemas/logging.config.schema.json
Normal file
150
config/schemas/logging.config.schema.json
Normal file
@@ -0,0 +1,150 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://khadhroony.local/schema/logging.config.schema.json",
|
||||
"title": "Khadhroony Solana logging configuration",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"active_profile",
|
||||
"profiles"
|
||||
],
|
||||
"properties": {
|
||||
"active_profile": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"profiles": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/logging_profile"
|
||||
}
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"non_empty_string": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"log_level": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"trace",
|
||||
"debug",
|
||||
"info",
|
||||
"warn",
|
||||
"error",
|
||||
"off"
|
||||
]
|
||||
},
|
||||
"logging_profile": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"default_level",
|
||||
"targets",
|
||||
"target_filters"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"default_level": {
|
||||
"$ref": "#/$defs/log_level"
|
||||
},
|
||||
"targets": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"$ref": "#/$defs/log_target"
|
||||
}
|
||||
},
|
||||
"target_filters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/log_target_filter"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"log_target": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"enabled",
|
||||
"sink",
|
||||
"level",
|
||||
"path",
|
||||
"rotation",
|
||||
"format",
|
||||
"ansi",
|
||||
"targets"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"sink": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"console",
|
||||
"file"
|
||||
]
|
||||
},
|
||||
"level": {
|
||||
"$ref": "#/$defs/log_level"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
},
|
||||
"rotation": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"never",
|
||||
"daily",
|
||||
"hourly"
|
||||
]
|
||||
},
|
||||
"format": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"human",
|
||||
"compact",
|
||||
"pretty",
|
||||
"json"
|
||||
]
|
||||
},
|
||||
"ansi": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"targets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"log_target_filter": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"target",
|
||||
"level"
|
||||
],
|
||||
"properties": {
|
||||
"target": {
|
||||
"$ref": "#/$defs/non_empty_string"
|
||||
},
|
||||
"level": {
|
||||
"$ref": "#/$defs/log_level"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user