Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123352 - Mldonkey does not rotate logs
Summary: Mldonkey does not rotate logs
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High minor (vote)
Assignee: Gentoo net-p2p team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-19 02:56 UTC by Vittorio Bertola
Modified: 2007-01-24 15:47 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild for a stable mldonkey with logrotate use flag (mldonkey-2.6.4-r2.ebuild,4.98 KB, text/plain)
2006-05-15 14:44 UTC, Patryk Rzadzinski
Details
logrotate config for mldonkey (mldonkey-logrotate,94 bytes, text/plain)
2006-05-15 14:52 UTC, Patryk Rzadzinski
Details
a small typofix for the previous ebuild. (mldonkey-2.6.4-r2.ebuild,4.99 KB, text/plain)
2006-05-15 14:54 UTC, Patryk Rzadzinski
Details
proper diff for the mldonkey-2.6.4-r2.ebuild (mldonkey-2.6.4-r3.diff,790 bytes, patch)
2006-05-16 13:09 UTC, Patryk Rzadzinski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vittorio Bertola 2006-02-19 02:56:38 UTC
If you activate logging, mldonkey's log grows hugely (in the order of 50-100 MB per day) and can easily fill up your /var before you notice.
The package should perhaps, when installed, drop log rotation information in /etc/logrotate.d/ for a standard log file located in /var/log/mldonkey.log .
Comment 1 Patryk Rzadzinski 2006-05-15 14:44:26 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"
Comment 2 Patryk Rzadzinski 2006-05-15 14:52:48 UTC
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?
Comment 3 Patryk Rzadzinski 2006-05-15 14:54:20 UTC
Created attachment 86822 [details]
a small typofix for the previous ebuild.
Comment 4 Patryk Rzadzinski 2006-05-15 14:55:48 UTC
Comment on attachment 86822 [details]
a small typofix for the previous ebuild.

ebuildmldonkey-2.6.4-r2.ebuild
Comment 5 Patryk Rzadzinski 2006-05-16 13:09:05 UTC
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.
Comment 6 spiralvoice 2006-07-12 07:24:22 UTC
Has this patch been tested with logrotate? How does logrotate handle
the situation that MLDonkey keeps the logfile file descriptor open
all the time?
Comment 7 spiralvoice 2006-07-23 07:21:36 UTC
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.
Comment 8 Jesus de Santos Garcia 2006-08-13 17:35:25 UTC
> 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?

Comment 9 spiralvoice 2006-09-06 14:11:30 UTC
(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
Comment 10 Christian Schlotter 2007-01-12 18:34:42 UTC
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.
Comment 11 Christian Schlotter 2007-01-12 23:30:58 UTC
(In reply to comment #10)
> MLDonkey >2.7.2 is in the tree, albeit not stable.

Of course I meant >2.7.7.
Comment 12 Raúl Porcel (RETIRED) gentoo-dev 2007-01-24 15:47:59 UTC
Closing as WONTFIX, as this implemented in >2.7.7.