Brand new to Serilog, I apologize in advance if my question has been answered before.
All Serilog configuration examples I've found imply that somewhere very early in the execution chain some code similar to the below one should get executed in order to make Serilog write the log.
In a regular console app, yeah, that works, I just add that code in Main(). However, I am writing a DLL, so there is no Main() method. I can't tell which method will get called first, so I can't add the code to a particular method.
So I'm pretty much stuck, unless I am missing something obvious. Could anyone help me with a hint?
Thank you
Log.Logger = new LoggerConfiguration()
.Enrich.FromLogContext()
.MinimumLevel.Verbose()
.WriteTo.File("log.txt", rollingInterval: RollingInterval.Day)
.CreateLogger();