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,8 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Default": "Information",
"Microsoft": "Information",
"Microsoft.Hosting.Lifetime": "Information"
}
},
@@ -17,24 +17,28 @@
},
"Serilog": {
"MinimumLevel": {
"Default": "Information",
"Override": {
"Default": "Information",
"Override": {
"System": "Information",
"Microsoft": "Warning"
"Microsoft": "Information"
}
},
"WriteTo": [
{ "Name": "File",
"Args": {
"path": "/tmp/FwSearchApi.log",
"rollingInterval": "Day"
}
}
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://192.168.178.44:9200",
"indexFormat": "TextorSearchLoggingIndex-{0:yyyy.MM}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7",
"registerTemplateFailure": "IndexAnyway"
}
}
],
"Enrich": ["FromLogContext", "WithMachineName"],
"Enrich": ["FromLogContext", "WithMachineName", "WithProcessId", "WithProcessName"],
"Properties": {
"Appname": "FeatureWerkSearchAPI",
"Environment": "Development"
"Appname": "TxSearchApi",
"Environment": "Development"
}
}
}