-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AuditTo:Sublogger configuration not working #2
Comments
Hi,
that seems about right, yes, you can also refer to serilog/serilog#1170 (comment) , which had this example that seems to match what you are trying to do : Log.Logger = new LoggerConfiguration()
.AuditTo.Logger(cfg => cfg
// only "audit" events will go through here
.Filter.ByIncludingOnly(evt => evt.Properties.ContainsKey("AuditEvent"))
.AuditTo.File(/*snip*/))
.WriteTo.Logger(cfg => cfg
// only "non audit events" will go through here
.Filter.ByExcludingevt => evt.Properties.ContainsKey("AuditEvent"))
.WriteTo.File(/**/))
// this applies to all
.Enrich.WithComputerName() |
Posted issue here: https://github.com/serilog/serilog-settings-configuration/issues/199 thanks. |
Above url looks ok, but the hyperlink is not. Should be: |
Does AuditTo support the idea of a sub logger? C# seems to allow it but not json configuration.
What is the difference in functionality between the following code?
P.S. I also have some filters that I left out for clarity but I want audit event to go to the one sink and everything else the other. (thus subloggers, right?)
The text was updated successfully, but these errors were encountered: