Passing object to WriteTo not working
movsesiv opened this issue · 1 comments
movsesiv commented
I try to configure Serilog settings for different environemnts using appsettings.json. When I'm trying to use objects in "WriteTo", it doesn't work. I can use only array of strings.
"Serilog": {
"Using": [
"AWS.Logger.SeriLog"
],
"LogGroup": "staging-api",
"Region": "us-east-1",
"MinimumLevel": "Information",
"Override": {
"Elastic.Apm": "None",
"Microsoft": "Warning",
"System": "Warning"
},
"Enrich": [ "FromLogContext" ],
"WriteTo": [
"AWSSeriLog"
]
}
This sample works.
"Serilog": {
"Using": [
"AWS.Logger.SeriLog"
],
"LogGroup": "staging-api",
"Region": "us-east-1",
"MinimumLevel": "Information",
"Override": {
"Elastic.Apm": "None",
"Microsoft": "Warning",
"System": "Warning"
},
"Enrich": [ "FromLogContext" ],
"WriteTo": [
{ "Name": "AWSSeriLog" }
]
}
This one doesn't work. I need to use objects to pass "Args"
sungam3r commented
You can add SelfLog.Enable(Console.Error)
to debug issues during logging setup. Most probably this is some naming or file-not-found issue.