I had a similar issue, it ends up because the following code,
public static IConfiguration Configuration { get; } = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables()
.Build();
the code specify the appsettings.json file, and in that file it has the serilog's configuration setttings, but when run in service, the current folder is not point to the executable file folder. so it can not find the file appsettings.json, and then of course serilog wont work as expected.
just need to change the code as following will make it work
public static IConfiguration Configuration { get; } = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile(AppDomain.CurrentDomain.BaseDirectory + "\\appsettings.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables()
.Build();