log4net works fine within editor, doesn't work outside
Hello,
I'm trying to create a logfile in C:\Users\Nick\AppData\LocalLow\AdverseAdventurers. I've setup log4net and it works fine within the editor. in order to load the configuration, I use the following code
XmlConfigurator.Configure(new FileInfo($"{Application.dataPath}/log4net.xml"));
When I create a build of the game, and run it outside of the editor, the logging stops working. So far, I've figured out I need to put the log4net.xml file in GameName_Data, since that's Application.dataPath at run time. I've confirmed that the configuration file is being loading by procmon. However, after that, I'm at a loss. None of the logging seems to work. I've tried running the game as an administrator, but that doesn't work.
Does Unity restrict i/o in any way? Or what paths can be written to?
I'm using Windows 10.
Thank you for your help.
Your answer
Follow this Question
Related Questions
Adding additional C# scripts after build (Android, iOS) 1 Answer
Editing a variable in another script during runtime 1 Answer
Adjust the size of the object within a parent container 0 Answers
How to change scripting runtime to 4.7.2 in Unity 2019.1.0f2? It is by default targeting 4.7.1 0 Answers
Why does my GameObject destroy itself? 0 Answers