Closed Pastafarian closed 7 months ago
@Pastafarian I'm not sure, but I think you can use "AuditTo" the same way as "WriteTo"
maybe something like this
{
"Serilog": {
"Using": ["Serilog.Sinks.RabbitMQ"],
"MinimumLevel": "Debug",
"WriteTo": [
{
"Name": "RabbitMQ",
"Args": {
// all args
}
}
],
"AuditTo": [
{
"Name": "RabbitMQ",
"Args": {
// all args
}
}
]
}
}
@Pastafarian I included the AuditTo configuration to the examples.
@ArieGato thanks so much for coming back with a detailed write-up in the docs. Much appreciated, my appologies for not getting back to you sooner.
Please feel free to close this issue.
@Pastafarian you're welcome. Glad to help
Hello,
I am a bit stuck, I want to setup both an audit logger and a standard logger using Json config.
The example given works well for creating a single logger, but I don't know how to extend it so I can configure both a standard and an audit logger. Is there a way of loading in two "WriteTo" configurations?
If not, my first thought would be to extend the configuration so we have seperate settings for both types of logger. Example below.
Happy to take a look at implementing, I know this would be a breaking change (unless we aliased the old values to the logging exchange by default, though even then though...). Hoping I just missed something obvious!