Hi,
Im using serilog in my asp core 6 application, and works fine and write to a log file.
Inside my project i use static class for some processing needs, in these, i would to use serilog to log to file.
Im unable to configure in this class serilog to write to file ,it seems that it is not possible to configure the logger in some way
public static class ProcessItem
{
private static readonly Serilog.ILogger _log = Log.ForContext(typeof(ProcessItem));
// i have log here
public static async void Process(Item item)
{
_log.Information("this is a log");
// this line log but i dont know where (no exception)
}
}
It does not seem possible to configure via WriteTo method where to write, as I do in other parts of my application.
Thanks