1

How should I correctly set up logging in a .NET Core console app that I intend to run on MacOS as a launch deamon/agent?

On Windows we've got the EventLog as the obvious solution.
On MacOS there's supposedly this:
https://developer.apple.com/documentation/os/logging

However, it seems awkwardly hard to plug into based on my other question about it specifically:
How to P/Invoke os_log?
...which leads me to think that I'm doing it wrong altogether.

How should I approach the issue?
Try harder to plug into os_log or maybe use something like Serilog's rolling file sink?
https://www.nuget.org/packages/serilog.sinks.rollingfile/

Thanks!

0 Answers0