TC stop logging after midnight (forever)

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

TC stop logging after midnight (forever)

Post by *ts4242 »

After midnight if "totalcmd.Date.log" is exist, TC lock "totalcmd.log" and stop logging.

how to reproduce: (let's say today is "19/9/2007")
1. select rotation option [] Everyday after midnight
2. create file "totalcmd.20070919.log" in the same "totalcmd.log" folder
3. adjust your system clock to "11:59:30 PM"
4. Close TC, wait half a minute and run TC again after midnight

now, any file operation will not logged and if you try to open "totalcmd.log" with notepad, you will got an access error

Although this bug cannot occurs in normal use but TC should handle this situation because it will stop logging forever!

WinXP/ TC 7.02a
User avatar
PeaceMaker
Senior Member
Senior Member
Posts: 287
Joined: 2005-12-31, 22:32 UTC
Location: Warsaw, Poland
Contact:

Post by *PeaceMaker »

In fact this behaviour could be treated as a bug, but the situation, in which it happens is very rare! Either way, this "exception" should be fixed...
[face=tahoma]LICENSE NUMBER: #101897 Single user license (since: 6th February 2004)
CURRENT VERSION: Total Commander 9.00 beta 12 (released: 31st August 2016)
[/face]
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I don't understand the problem. Why would you create such a file? TC renames the old log to that name, so if it cannot rename it, what should it do?

Logging should continue one day later, though.
Author of Total Commander
https://www.ghisler.com
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

Ghisler(Author) wrote:Why would you create such a file?
this happened by accident when i test my tool "TC Log Viewer"
Ghisler(Author) wrote:TC renames the old log to that name, so if it cannot rename it, what should it do?
you may try another name e.g. "totalcmd.Date.1.log"
Ghisler(Author) wrote:Logging should continue one day later, though.
Never, because every midnight TC try to create "totalcmd.Date.log" and fails as far as there is an already file with that name.
The problem is that, you get ".Date" from the file content not from the system therefore the new file name will be the same all the time!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will consider that, thanks for the suggestion.
Author of Total Commander
https://www.ghisler.com
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

Fixed in TC 7.03
if "totalcmd.Date.log" exists, TC continue logging in "totalcmd.log" not create "totalcmd.Date.n.log". Is this intended?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, this is intended! TC will switch log files the next day as usual if the log file with that date doesn't exist yet either.
Author of Total Commander
https://www.ghisler.com
Post Reply