Closed Bug 312931 Opened 20 years ago Closed 20 years ago

Logging goes to the wrong files if the date changes sufficiently while the logged view is open

Categories

(Other Applications Graveyard :: ChatZilla, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Gijs, Assigned: Gijs)

Details

(Whiteboard: [cz-0.9.72])

Attachments

(1 file)

7.34 KB, patch
bugzilla-mozilla-20000923
: review+
Details | Diff | Splinter Review
Steps to reproduce: 1. Set your ChatZilla logging format for client to something that includes seconds ($n). 2. Enable logging of the client view. 3. Open ChatZilla. 4. Execute: /echo foo 5. Execute: /echo bar 6. Click on the file:/// link generated by /log Actual Results: The file url gives a File Not Found error. In the parent directory resides 1 file with the new filename format, in which both 'foo' and 'bar' are written. Expected Results: The file url does not give a File Not Found error. In the parent directory reside files for every second, accessed at will. (Alternatively, don't allow logging formats to have seconds in their filenames) Note: this bug also occurs if the user leaves ChatZilla on using default logging filenames while the date changes (either because the user messes with the OS date settings, or because the date changes normally (we pass midnight)) This bug is annoying, it's preventing me from opening my logfiles in one go, and it would become hard to find information if you leave ChatZilla on all the time. It's not life threatening because your information does get saved. Hence, severity: minor. The possible fix for this problem would be: 1. As we open the logfile, figuring out what date we are using 2. As we open the logfile, use the format to deduce what the most specific unit of time used in the filename is (minutes, seconds, years, etc.) 3. Use both of the above every time we try to log a message to see if we need to change logfile. I might attempt to fix this if nobody beats me to it. It should not be any time *real* soon though, exams are next week. It might be any time real soon if I get bored with studying.
Attached patch PatchSplinter Review
Assignee: rginda → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Attachment #214122 - Flags: review?(silver)
Comment on attachment 214122 [details] [diff] [review] Patch >+ if (file.indexOf("$h") != -1) >+ obj.smallestLogInterval = "h"; >+ >+ >+ Nit: only one blank line here please. >+ // kick-start a log-check interval to make sure we change logfiles in time: >+ // It will fire 2 seconds past the next full hour. >+ setTimeout("checkLogFiles()", 3602000 - (Date.now() % 3600000)) Nit: missing semi-colon. r=silver with those nits fixed.
Attachment #214122 - Flags: review?(silver) → review+
Checked in --> FIXED
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [cz-0.9.72]
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: