From bd23c4225156bac6a3db1e146aa6fa431c4bb772 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Mon, 14 Dec 2020 14:36:31 +1300 Subject: [PATCH] Add logging properties --- src/schemas/json/appsettings.json | 68 +++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 13 deletions(-) diff --git a/src/schemas/json/appsettings.json b/src/schemas/json/appsettings.json index e3dd1205d8d1..54e6fba1ca61 100644 --- a/src/schemas/json/appsettings.json +++ b/src/schemas/json/appsettings.json @@ -254,21 +254,24 @@ } } }, + "logLevelThreshold": { + "description": "Log level threshold.", + "type": "string", + "enum": [ + "Trace", + "Debug", + "Information", + "Warning", + "Error", + "Critical", + "None" + ] + }, "logLevel": { "description": "Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.", "type": "object", "additionalProperties": { - "description": "Log level configuration.", - "type": "string", - "enum": [ - "Trace", - "Debug", - "Information", - "Warning", - "Error", - "Critical", - "None" - ] + "$ref": "#/definitions/logLevelThreshold" } }, "logging": { @@ -277,6 +280,45 @@ "properties": { "LogLevel": { "$ref": "#/definitions/logLevel" + }, + "Console": { + "properties": { + "LogLevel": { + "$ref": "#/definitions/logLevel" + }, + "FormatterName": { + "description": "", + "type": "string" + }, + "FormatterOptions": { + "description": "", + "type": "object" + }, + "LogToStandardErrorThreshold": { + "$ref": "#/definitions/logLevelThreshold" + } + } + }, + "EventSource": { + "properties": { + "LogLevel": { + "$ref": "#/definitions/logLevel" + } + } + }, + "Debug": { + "properties": { + "LogLevel": { + "$ref": "#/definitions/logLevel" + } + } + }, + "EventLog": { + "properties": { + "LogLevel": { + "$ref": "#/definitions/logLevel" + } + } } }, "additionalProperties": { @@ -294,10 +336,10 @@ "type": "string" }, "connectionStrings": { - "description": "Entity Framework Core connection string configuration.", + "description": "Connection string configuration. Get connection strings with the IConfiguration.GetConnectionString(string) extension method.", "type": "object", "additionalProperties": { - "description": "Connection string configuration. Each connection string has a name specified by its JSON property name. Get connection strings with the IConfiguration.GetConnectionString(string) extension method.", + "description": "Connection string configuration. Each connection string has a name specified by its JSON property name.", "type": "string" } }