Page 1 of 1

Cannot move/disable log File

Posted: Tue Oct 29, 2019 4:25 pm
by diego10arg
XMBC Version: 2.18.8 Portable
Windows Version: W7U
Mouse Information (brand/model): HP Omen
Relevant Computer Information (CPU, RAM etc): FX8320E
Did the problem occur after an upgrade of XMBC? (If so, from what version?): No
Did the problem occur after a Windows update/upgrade? (If so, from what version?): No
How long have you used XMBC?: Years
What language and keyboard layout do you use in Windows?: Win EN, Keyboard ES (LATAM)

Clear description of the problem - try and include as much information as possible, including what button and mappings you are having problems with (if applicable).:

Hi everyone, I am not being able to change the log file location. It will always create the file in the same folder XMouseButtonControl.exe is.

I have tried to set the path to C:\Temp (which exists in my PC) but after saving/restarting XMBC it keeps creating the Logfile where the executable is.

I could not find an option or way to completly disable loggin at all. (I want to do so because I sync this folder to my OneDrive account and it keeps saying "1 file can't be synced with OneDrive" (because it says it is in use)

Thanks in advance!

Re: Cannot move/disable log File

Posted: Tue Oct 29, 2019 5:09 pm
by phil
In portable mode the log always gets created with the executable (as does all the settings) this is because in portable mode it is intended to not write anywhere but alongside the exe (as in that's how it was designed to work). It it wrote somewhere else, it wouldn't really be "portable" as it would be making a change to the host OS (even if that's a temp location)

You could launch XMBC with the argument /nolog to disable logging completely (I think its /nolog try /? to get a list of all CLI options)
There is also a setting in the XMBCSettings.XML file called <Logging Disable="false" /> - if you change that to <Logging Disable="true" /> it should have a similar effect.

NOTE: There is a known issue in 2.18.8 (the latest release) and earlier where the log file location is saved in the registry (and that doesn't work in portable mode). I believe therefore it just forgets the setting rather than saving it in the xml file (which is what it should be doing) - This should be fixed in the next release when I get around to it!

Re: Cannot move/disable log File

Posted: Tue Oct 29, 2019 5:24 pm
by diego10arg
Phil,

Thanks for your quick reply.

As I see in HKEY_LOCAL_MACHINE\SOFTWARE\Highresolution Enterprises\XMouseButtonControl there is a setting called SettingsFolder set to C:\Temp, but it is still not using it.
...in the XMBCSettings.XML file called <Logging Disable="false" /> - if you change that to <Logging Disable="true" />...
This fixed my issue!

Thanks!

Re: Cannot move/disable log File

Posted: Tue Oct 29, 2019 5:37 pm
by phil
Thats good that it fixed the issue.
But its bad that there is something in HKEY_LOCAL_MACHINE\SOFTWARE\Highresolution Enterprises\XMouseButtonControl - that should NOT be happening on a portable application.. I will investigate (but not now as I'm on holiday right now!)

Re: Cannot move/disable log File

Posted: Tue Oct 29, 2019 5:56 pm
by diego10arg
phil wrote:
Tue Oct 29, 2019 5:37 pm
I'm on holiday right now!)
Enjoy then! :cheers:

Re: Cannot move/disable log File

Posted: Tue Oct 29, 2019 9:26 pm
by diego10arg
diego10arg wrote:
Tue Oct 29, 2019 5:24 pm
...in the XMBCSettings.XML file called <Logging Disable="false" /> - if you change that to <Logging Disable="true" />...
This fixed my issue!
It did not.

I had to use the /nolog option.

Re: Cannot move/disable log File

Posted: Tue Oct 29, 2019 10:45 pm
by phil
So the settings file option didn't work? You seemed to suggest it worked initially, did it just take a while before the first log? I wonder if something is not properly reading that setting - I will have to investigate sometime after I get home; I'll add that to the bug list....

Re: Cannot move/disable log File

Posted: Tue Oct 29, 2019 10:52 pm
by diego10arg
So the settings file option didn't work?
No, it did not work.
You seemed to suggest it worked initially, did it just take a while before the first log?
Initialy I thought it had worked because I have deleted the .log file and it did not appear immediately after restarting XMBC.

After a few hours of use I took a look at the XMBC folder and the log file was again, so I started it with /nolog option and so far it has not reappeared.

My post @ "Tue Oct 29, 2019 5:26 pm" was to let you know that the XML Setting was not the solution.

Re: Cannot move/disable log File

Posted: Tue Oct 29, 2019 10:54 pm
by phil
Yeh I got that. Interesting that the file did not appear immediately, I would be rather interested in the content of the file (if you could repeat the test) because it may point me to the problem area more quickly. But don't worry if not, I'll see if I can reproduce it sometime after I get home.

Re: Cannot move/disable log File

Posted: Tue Oct 29, 2019 11:15 pm
by diego10arg
I closed XMBC, started it without the /nolog option and the log appeared immediately.

With the log file in place, I restarted with the /nolog and the log is still there but it is not being written (OneDrive can upload it properly).

Maybe I was wrong about this and just did not pay attention.
...the .log file and it did not appear immediately after restarting XMBC.
Either way, the <Logging Disable="true"/> option in the XML is being ignored.

If you need anything else, just let me know.