serilog / serilog-sinks-console

Write log events to System.Console as text or JSON, with ANSI theme support
Apache License 2.0
248 stars 72 forks source link

Add AuditTo support #141

Closed sungam3r closed 1 year ago

sungam3r commented 1 year ago

friendly bump @nblumhardt @SimonCropp

nblumhardt commented 1 year ago

Thanks @sungam3r 👍

Have you considered whether auditing scenarios to the console might require calls to Console.(Out|Error).Flush()? I haven't looked into whether there's any prior art, but I imagine that if console output is redirected somewhere (e.g. an audit file) then flushing internal buffers would be necessary before the audit event could be considered durable.

sungam3r commented 1 year ago

Looking into the code I see that Console.Emit calls Flush in any case: https://github.com/serilog/serilog-sinks-console/blob/dev/src/Serilog.Sinks.Console/Sinks/SystemConsole/ConsoleSink.cs#L59-L78

nblumhardt commented 1 year ago

LGTM, thanks @sungam3r 👍

CI is broken due to API approval tests

sungam3r commented 1 year ago

🤦‍♂️ done