my Nlog configuration for logging to file looks like this
"allLogFile": {
"type": "file",
"fileName": "C:\\Users\\myUserName\\Documents\\logs\\Log.txt",
"archiveFileName": "C:\\Users\\myUserName\\Documents\\logs\\Log.{#}.txt",
"archiveNumbering": "Date",
"archiveEvery": "Day",
"archiveDateFormat": "yyyyMMdd",
"layout": "${longdate}| ${uppercase:${level}}| ${logger}| ${message} ${exception:format=tostring}"
}
It does not create the logs file, but if I change the path to "fileName": "C:\\Users\\myUserName\\Desktop\\logs\\Log.txt" then it works file, Ive tried several other locations like Pictures, Downloads, C:, does not work as well, for Documents Ive also tried ${specialfolder:folder=MyDocuments}\\logs\\Log.txt.
My first guess is maybe permission rights problem? Also I have "throwConfigExceptions": true, in the config, it throws exceptions if some fields in config is wrong, but doesnt throw for this problem (I guess its only exceptions for config rather than writting)
So is there a way to make it able to write in other directories liek Documents?