nreco / logging

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

Windows service log to executable path #33

Closed pedrodagraca closed 2 years ago

pedrodagraca commented 2 years ago

Is there a way of specifying that the relative path given by Path in the settings should be relative to the executable instead of c:\windows\system32 when running a console app as a Windows service?

VitaliyMF commented 2 years ago

Sure, you can specify FormatLogFileName handler and resolve relative file name as you need (in the same way as it is used in https://github.com/nreco/logging#change-log-file-name-on-the-fly).

pedrodagraca commented 2 years ago

Thanks for the feedback.