It work well using 'dotnet publish'. But I publish using 'dotnet publish /p:PublishSingleFile=true', I found it has no logs.
Hi! Thanks for opening your first issue here! Please make sure to follow the issue template - so we could help you better!
See https://github.com/NLog/NLog/issues/3517
ergo: use ${basedir:fixtempdir=true} and NLog 4.6.8+
thank's for 304NotModified
I change the path in the nlog.config and it work .
great! :)
@304NotModified
hi, I get this issue as well
and my Nlog 4.6.8 :
<target xsi:type="File" name="f1" fileName="${basedir:fixtempdir=true}/../logs/Normal/${shortdate}.txt"
layout="${longdate} ${newline} ${uppercase:${level}} ${message} ${newline}" />
but it is not work in linux service
@longskikondi Please create new issue and fill out the template: https://github.com/NLog/NLog/issues/new/choose (Avoid piggy-backing on old issues)
Think the most important part is to provide the output from the InternalLogger (on debug-level). You need to provide the details of where Microsoft have decided to handle unzipping of single-file-publish-app on Linux (On Windows they used the temporary directory. Maybe another hack is used on Linux).
Please investigate yourself and if you find the issue, and can see NLog could be improved in handling single-file-publish-app on Linux, then please create a pull-request.
Most helpful comment
thank's for 304NotModified
I change the path in the nlog.config and it work .