Summary: | Mldonkey does not rotate logs | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Vittorio Bertola <in-bugzilla> |
Component: | New packages | Assignee: | Gentoo net-p2p team <net-p2p> |
Status: | RESOLVED WONTFIX | ||
Severity: | minor | CC: | again, jesus.de.santos, pacho |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
ebuild for a stable mldonkey with logrotate use flag
logrotate config for mldonkey a small typofix for the previous ebuild. proper diff for the mldonkey-2.6.4-r2.ebuild |
Description
Vittorio Bertola
2006-02-19 02:56:38 UTC
Created attachment 86820 [details]
ebuild for a stable mldonkey with logrotate use flag
Installs logrotate conf file (mldonkey) in /etc/logrotate.d/ when used with USE="logrotate"
Created attachment 86821 [details]
logrotate config for mldonkey
Based on what you wrote, 150m per file and 2 files kept seem reasonable... all depends on how much space you got - but maybe we can assume p2p-network users got large hard drives?
Created attachment 86822 [details]
a small typofix for the previous ebuild.
Comment on attachment 86822 [details]
a small typofix for the previous ebuild.
ebuildmldonkey-2.6.4-r2.ebuild
Created attachment 86876 [details, diff]
proper diff for the mldonkey-2.6.4-r2.ebuild
I've been advised to commit diffs rather than ebuilds, so here it is, also including a small fix; sorry for trouble.
Has this patch been tested with logrotate? How does logrotate handle the situation that MLDonkey keeps the logfile file descriptor open all the time? https://savannah.nongnu.org/patch/?func=detailitem&item_id=5258 https://savannah.nongnu.org/patch/?func=detailitem&item_id=5260 With these patches MLDonkey can log directly to syslog daemon. Make option log_file empty and all logging goes to syslog which in turn can be controlled by logrotate.
> Has this patch been tested with logrotate? How does logrotate handle
> the situation that MLDonkey keeps the logfile file descriptor open
> all the time?
You need to add a postrotate command to restart mldonkey when the log gets filled:
postrotate
/etc/init.d/mldonkey restart &> /dev/null
But I don't think it is a good idea to have by default a logrotate script for a file that is recreated each time mldonkey is restarted.
The syslog alternative seems to be fine for me... BTW, How can the verbosity of the mldonkey output be controlled?
(In reply to comment #8) > You need to add a postrotate command to restart mldonkey when the log gets > filled: Restarting MLDonkey can have bad side effects on download performance. MLDonkey has internal commands "close_log" and "open_log" which can be send using Telnet before and after logrotate does its work. But using syslog would be a better solution. The syslog patches are currently part of post-2.7.7 CVS: 5260: Enable logging to syslog, update syslog.ml to version 1.3 * New option log_to_syslog, default false Post log messages to syslog. This setting is independent of log_file and its associated commands, therefore close_log does not stop log to syslog. Its therefore possible to log to syslog and log_file at the same time. I would like to see current CVS in Gentoo unstable after 2.7.7 has gone into stable on all major platforms, hint, hint;-) > BTW, How can the verbosity of the mldonkey output be controlled? http://mldonkey.sourceforge.net/Verbosity MLDonkey >2.7.2 is in the tree, albeit not stable. I think this bug can be closed as soon as this happens. I can confirm that logging to syslog works like a charm with 2.8.2-r1. (In reply to comment #10) > MLDonkey >2.7.2 is in the tree, albeit not stable. Of course I meant >2.7.7. Closing as WONTFIX, as this implemented in >2.7.7. |