[stunnel-users] Log rotation patch

Christophe Nanteuil christophe.nanteuil at gmail.com
Wed Dec 17 16:16:52 CET 2008


NB : I propose this patch in alpha version. It has been tested only on a
Linux Mandriva. (in the alpha version, it's recommended to use it on logs
you might loose).

Why to use this patch ?
One reason I have to restart periodically stunnel is to do log rotation.
This patch allows log rotation while running stunnel by implementing it
directly inside. Therefore, the established connections are not closed by
log rotation.

Patch to version : 4.26 (should work on earlier versions).

Type : new feature

Description : Log rotation inside stunnel

How to use this patch ?
3 new options are added in config file (see manual)
maxLogSize : maximum size of log file (output option in config file). If
logs have to be added, a log rotation is initiated.
maxLogFiles : how many log files you want to keep. Default 7.
useLogCompression : specify if rotated log files kept must be compressed or
not. (requires zlib to be set).

Just recompile stunnel after applying patch in stunnel directory:
patch -p1 < /path/to/stunnel-logrot-0.10a.patch

Test results are welcomed.

Christophe Nanteuil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20081217/213e9e95/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stunnel-logrot-0.10a.patch
Type: text/x-patch
Size: 12566 bytes
Desc: not available
URL: <http://www.stunnel.org/pipermail/stunnel-users/attachments/20081217/213e9e95/attachment.bin>

More information about the stunnel-users mailing list