[wpkg-users] [Bug 79] Major WPKG enhancements, remote logging, doc, internal restructuring

bugzilla-daemon at bugzilla.wpkg.org bugzilla-daemon at bugzilla.wpkg.org
Mon Nov 12 13:55:16 CET 2007


http://bugzilla.wpkg.org/show_bug.cgi?id=79





--- Comment #30 from Rainer Meier <skybeam at users.sourceforge.net>  2007-11-12 13:55:10 ---
I chose log overwriting on purpose. If you look at the code it is documented
how to use log appending within the code but I decided for log overwriting.

Why:
First of all I wanted to prevent log files growing to infinite while
administrators might usually just be interested to have a look at the last run
(history is not really meaningful usually). Additionally the goal was to keep
wpkg as easy as possible - not messing around with rotation.

Moreover rewriting of the same file on each reboot allows even to restrict
users from creating new files within that directory - so preventing them to
store any garbage there.

By the way if you like to keep the full log history you might still do that by
using another log naming scheme. For example using
"wpkg-log-[YYYY]-[MM]-[DD]-[HH][mm].log" would write a new log file each minute
(not overwriting the previous one). If you think a computer can be restarted
within one minute we might even introduce a "seconds" identifier but I think
that's not needed.

In fact I thought by myself to introduce a new parameter:
/logMode:<append|rewrite> but then I decided not to introduce it and use
rewrite by default. Especially since using of a filename which contains a
timestamp (as described above) allows creating of new files on each run.
Additionally this allows easier log archiving. Appending to the same logfile
(with or without rotating) keeps the file modification date updated each time
so it cannot be archived by logrotate scripts based on modification date.

Also moving of log files (rotation) requires permissions on the server.
Additionally it introduces a functionality which can be done by already
existing and proved-to-work tools like logrotate (which is even part of almost
any Linux distribution). I am not a friend of implementing things which are
already existing. Especially if it adds complexity and the risk of failure
(access rights on server).


Log timestamps:
Leon is right - the timestamp should probably contain the seconds as well. I
will add it.


So what I am going to implement:
- seconds output within the log timestamp
- seconds template for filename creation template


-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users



More information about the wpkg-users mailing list