I have .net core web api project with Production,Stage and Development environments. i used {baseDir} in filename of nlog target but when i run project it store log file in bin\netcoreapp3.1\netcoreapp3.1 folder.
I have a folder Logs and i want to store logs in this folder.
same in all environments i want that.
Anyone know how to do that please help me !!
for more detail :
nlog.config
<variable name="DefaultLayout" value="${longdate} ${processid} ${uppercase:${level}} ${logger:shortName=true} ${environment-user} ${local-ip} ${message} "/>
<targets async="true">
<target xsi:type="File" name="file" layout="${DefaultLayout}" fileName="${baseDir}\log-${shortdate}.log" />
</targets>
Thank you !!