I need to log some funcionality in my web API published in IIS so I have this in startup.cs
fileLog = @"c:\inetpub\wwwroot\planificadorwebapi\planificadorLog.json";
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(Configuration)
.WriteTo.File(new JsonFormatter(), fileLog, shared: true)
.CreateLogger();
I try to creat the file in the folder of the application but this file is never created. I make requests that log information but the file does not exist
When I start the application in Visual Studio the file is created and this works perfectly
Any idea please?
Regards