OP and Logging to Elasticsearch

This commit is contained in:
Roland Fieger
2021-10-12 16:42:24 +02:00
parent 66f8d19f67
commit e9d30aad16
8 changed files with 81 additions and 41 deletions

View File

@@ -1,9 +1,7 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Information",
"Microsoft.Hosting.Lifetime": "Information"
"Default": "Information"
}
},
"ElasticApm":
@@ -14,5 +12,31 @@
"Environment": "Development",
"CaptureBody": "all"
},
"AllowedHosts": "*"
"AllowedHosts": "*",
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"System": "Information",
"Microsoft": "Information"
}
},
"WriteTo": [
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://192.168.178.44:9200",
"indexFormat": "TextorSearchLoggingIndex-{0:yyyy.MM}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7",
"registerTemplateFailure": "IndexAnyway"
}
}
],
"Enrich": ["FromLogContext", "WithMachineName", "WithProcessId", "WithProcessName"],
"Properties": {
"Appname": "TxSearchApi",
"Environment": "Production"
}
}
}