[9.10x64b1] Changing location of log file stops logging.

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

[9.10x64b1] Changing location of log file stops logging.

Post by *wanderer »

TC was set to create a log file in %TEMP%\totalcmd.log.

I changed that to %TEMP%\TC\Log\totalcmd.log but i noticed the log file was not created there. I also noticed that entries were not added in the original log file.

I tried manually creating the %TEMP%\TC\Log folder, but no luck.

EDIT: I had to delete the original log file for the new one to be created in the new folder.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Maybe the permissions didn't allow to write to the directory/file?
Author of Total Commander
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

ghisler(Author) wrote:Maybe the permissions didn't allow to write to the directory/file?
Nope, i'm full admin in the PC (Win7) with UAC disabled. And also i tried this in my account's %TEMP% folder.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, no other ideas. Since it works now, I will not follow it any further.
Author of Total Commander
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

ghisler(Author) wrote:Since it works now
Does it? The logging stopped (no new file was created and also log entries were not written in the old file) and the only way to resume was to manually delete the old log file.

I remembered now that i also played with the "log file rotation" setting (it was "Never" and i changed it to "Every day"). Let me do some more tests later today, i'll get back to you on that.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

OK, i have a more clear idea on what caused the problem.

1. TC is trying to create the log file only on an existing folder. If the folder does not exist, it does not automatically create it. IMO it would be more convenient if it did, or perhaps ask "Log folder does not exist, create it?", if you feel it would be better.

2. If you change the log file location to a folder that does not exist, the first time TC will try to write to the log (in the current TC session), it will try to write at the new location, will not be able to do so and then logging effectively stops. That's why i thought logging was disabled. Even if you create the folder afterwards, the log file is not created. You have to close and reopen TC (after creating the folder) for logging to resume.

In any case, all these are curable if:
1. The user creates the new folder before changing the log file location OR
2. TC just creates the new folder after pressing OK in Settings (no questions asked).

My vote would be on (2).
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2. TC just creates the new folder after pressing OK in Settings (no questions asked).
I think TC should ask - it is more likely that the user mistyped an existing path, than it is that he actually wants a new path IMHO.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I didn't change this in beta 2, I'm unsure how I should handle it. IMHO the user is responsible to use a correct path here.
Author of Total Commander
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

ghisler(Author) wrote:I didn't change this in beta 2, I'm unsure how I should handle it. IMHO the user is responsible to use a correct path here.
Well, i won't argue that. The problem is that if he does enter something wrong (as petermad suggested), he will assume he has a log and when he tries to use it after 6 months, he will just realize he thought he had a log but apparently he didn't because of a typo.

If you do not think it's nice to auto-create the folder, i think that TC at least should warn the user that the log file will not be created because the destination path does not exist.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Post by *Flint »

ghisler(Author)
Some programs check the path immediately as user is typing it, and if there is something wrong highlight either the editbox, or text inside it with red. Maybe, worth implementing something like that?
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
User avatar
wanderer
Power Member
Power Member
Posts: 1575
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Flint wrote:ghisler(Author)
Some programs check the path immediately as user is typing it, and if there is something wrong highlight either the editbox, or text inside it with red. Maybe, worth implementing something like that?
Would be a nice solution IMO. If done properly (not intense red, a more pink-ish backcolor perhaps), would give a nice, modern touch to TC and could perhaps be used in other locations too.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
Post Reply