[wpkg-users] Logging enhancement request
Rainer Meier
r.meier at wpkg.org
Mon Feb 18 13:36:01 CET 2008
Hi Grubi
grubi wrote:
> No sure if it is a good idea to integarte log rotation directly into
> wpkg. This one could easily be done by regularily scheduling a simple
> jscript deleting all files older than a specific date. Additionally you
> could also do things like packing old logs and move them to a different
> location. This approach reduces complexity of wpkg and still gives you
> all the flexibility you need.
Exactly my point of view. This discussion was already held on WPKG
bugzilla - see <http://bugzilla.wpkg.org/show_bug.cgi?id=79#c31> for
example. It was kind of an off-topic discussion for my 1.0 re-design.
However my point of view is quite clear. There are as many ways to
rotate the files as there are ways to imagine rotation (by date, by
size, by execution...). I think log housekeeping should be up to
dedicated tools which can handle all this requirements. There is no need
to incorporate all possible log-rotation techniques to WPKG.
> However what IMHO is still missing is the flexibility to specify that
> logs are appended and not overwritten. If you look at other apps you
> will find that appending to logs it the most often default behavour for
> logging because this ensures that no important information gets lost.
Well that I thought about as well. However if you specify the date (up
to the second timestamp) in the filename it will never be overwritten.
Of course that does not completely satisfy the requested ability to
append logs. At least this makes sure that the logs are not growing
indefinitely. Furthermore it prevents users to upload huge log-files
which contains the output of several runs.
I am currently thinking about introducing a new "appendLog" parameter to
config.xml which is set to "false" by default. What I don't like too
much about that idea is that appending logs always makes it harder to
rotate them since their timestamp continously changes. Additionally you
don't know on server side when the next write access to that file will
happen. Therefore it might always happen that you rotate/move the log
while it is in use. So I still prefer that each run writes a completely
new log file if you want to keep the history. If history is not
important (I think in most cases you're just interested in the output of
the last run) you can keep the default which overwrites the same file
each time.
So please keep patient on this until next release.
br,
Rainer
More information about the wpkg-users
mailing list