nreco / logging

Generic file logger for .NET Core (FileLoggerProvider) with minimal dependencies
MIT License
299 stars 61 forks source link

IIS does not write any logs #69

Open ZhmerenkaSolution opened 2 months ago

ZhmerenkaSolution commented 2 months ago

Have a weird issue: When I host application in IIS - it doesn't write any logs. But, when I launch just .exe (Kestrel) it writes everything as supposed. Log file located in the root of publish folder. Every folder permission is granted. Does IIS have some local folder where host process locates and file paths starts there? Project - asp net 7, blazor webassembly. I understand that issue is not within logger.

VitaliyMF commented 2 months ago

Try to specify full path instead of just log file name. A relative path is resolved in a usual way (default folder is app's working directory), but when MVC Core app started by IIS most likely working directory is not a directly with app's binaries.