Closed
Bug 233973
Opened 21 years ago
Closed 20 years ago
logs should be separated in different files by day
Categories
(Other Applications :: ChatZilla, enhancement)
Other Applications
ChatZilla
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: littlezephyr, Assigned: rginda)
References
Details
(Whiteboard: cz-patch)
Attachments
(1 file, 2 obsolete files)
16.40 KB,
patch
|
rginda
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 Chatzilla currently logs everything from each channel/server/query view into a single file for each thing like this: profiledir/chatzilla/logs/moznet,%23chatzilla.log (for channels) profiledir/chatzilla/logs/moznet,littlezephyr.log (for user views) profiledir/chatzilla/logs/moznet.log (for server views) The problem is, the files are always the same, and for busier channels, the size can get quite large, making them very cumbersome and heavy. Thus I think CZ should make each view its own directory, and name the files daily, logging all of that days info into that file. For each of the examples above, here's my preposed format: profiledir/chatzilla/logs/moznet,%23chatzilla/moznet,%23chatzilla-2-11-04.log profiledir/chatzilla/logs/moznet,littlezephyr/moznet,littlezephyr-2-11-04.log profiledir/chatzilla/logs/moznet/moznet-2-11-04.log The format for March 28th logs would be: profiledir/chatzilla/logs/moznet,%23chatzilla/moznet,%23chatzilla-3-28-04.log profiledir/chatzilla/logs/moznet,littlezephyr/moznet,littlezephyr-3-28-04.log profiledir/chatzilla/logs/moznet/moznet-2-28-04.log This way, the files don't get as large, but they are still roughly together and still reasonably organized... Reproducible: Always Steps to Reproduce:
Comment 1•20 years ago
|
||
A few people have suggested this, confirming RFE.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•20 years ago
|
||
Please, use the ISO8601 date stamp (also known as SQL date stamp) in the files-names, i.e. YYYY-MM-DD. This way files will be sorted properly and we will not have any intl issues. Or one may also create a user_pref for this matter, but please, set it to YYYY-MM-DD by default. For more details and advantages of ISO 8601, see <http://www.cl.cam.ac.uk/~mgk25/iso-time.html>.
Comment 3•20 years ago
|
||
How about this: a single pref to dictate the log file location, with the following expansions: %s - server or network name. %c - channel/user name (blank for network views) %v - full view name, (basically "%s,%c") Then %y, %m and %d for the date. The default can be, for example, profilepath/chatzilla/logs/%v/%v-%y-%m-%d.log". I don't think I can fix this bug with the current logFileName prefs, so they may disappear - though perhaps I could make the default value for that pref be generated /from/ this global pref - but you could set them to fix one view to one log file.
Comment 4•20 years ago
|
||
This makes the 4 types of log have their own pref controlling the location, with %network%, %channel% and %user% replacements, as well as date and time % codes. The logs are also all rooted based on logFolder now, which can be moved away from the profilePath pref. Note that log filenames are generated (unless explicitly set) as needed, and thus the date/time used will be that at the time of opening the log.
Updated•20 years ago
|
Whiteboard: cz-patch
Updated•20 years ago
|
Attachment #143248 -
Flags: review?(samuel)
Updated•20 years ago
|
Attachment #143248 -
Flags: review?(samuel) → review+
Updated•20 years ago
|
Attachment #143248 -
Flags: approval1.7b?
Comment 5•20 years ago
|
||
Comment on attachment 143248 [details] [diff] [review] Adds 4 prefs to control log locations. a=chofmann for 1.7b
Attachment #143248 -
Flags: approval1.7b? → approval1.7b+
Comment 6•20 years ago
|
||
Comment on attachment 143248 [details] [diff] [review] Adds 4 prefs to control log locations. er, lets hold off and do this feature early in 1.8a. trying to shut down and get some beta bits out the door. sorry about the confusion. thanks
Attachment #143248 -
Flags: approval1.7b+ → approval1.7b-
Comment 7•20 years ago
|
||
Comment on attachment 143248 [details] [diff] [review] Adds 4 prefs to control log locations. Silver, could you replace ".log" with ".txt" extension? I think, .txt will be friendlier with systems that judge the content of a file by extension.
Updated•20 years ago
|
Summary: logs should be seperated in different files by day → logs should be separated in different files by day
Updated•20 years ago
|
Attachment #143248 -
Attachment is obsolete: true
Comment 8•20 years ago
|
||
Updated•20 years ago
|
Attachment #160975 -
Flags: review?(rginda)
Assignee | ||
Comment 9•20 years ago
|
||
Comment on attachment 160975 [details] [diff] [review] Updated version of patch I think the way you're doing the replacement will run into problems with encoded chars. If you replace %channel% with some channel that encodes to something with a "%d" in it, for example, then the shortcodes are going to stomp it. Also, I've been leaning toward a lambda replace in situations like this, to avoid the multiple .replace calls. If you did the replace as... file.replace(/\$\(([^))]\)|\$(\w), f); The vars could be expressed as $(network) or $d. Because it's done with a single replace() call, you don't have to worry about replaced text causing new matches, either.
Comment 10•20 years ago
|
||
Some great comments, rginda - here's an updated version that uses $(network), etc. as suggested, plus a lambda replace function.
Attachment #160975 -
Attachment is obsolete: true
Updated•20 years ago
|
Attachment #160975 -
Flags: review?(rginda)
Updated•20 years ago
|
Attachment #162052 -
Flags: review?(rginda)
Comment 11•20 years ago
|
||
typos :)
>+ dd("Unknown long code: " + longNane);
>+ dd("Unknown short code: " + longNane);
Assignee | ||
Comment 12•20 years ago
|
||
Comment on attachment 162052 [details] [diff] [review] Updated patch based on comments // Each is available only if >>appripriate<< for the object. small typo +const __cz_guid = "59c81df5-4b7a-477b-912d-4e0fdf64e5f2"; What's that for? r=rginda
Attachment #162052 -
Flags: review?(rginda) → review+
Comment 13•20 years ago
|
||
That's ChatZilla's GUID, and isn't nessessary for this change but I used it in another patch I'm working on (including the icons in the XPI) and thought it would be nice to put in there.
Comment 14•20 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Core → Other Applications
You need to log in
before you can comment on or make changes to this bug.
Description
•