[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Antw: Re: Q: using logrotate for auditlog file
>>> Howard Chu <hyc@symas.com> schrieb am 16.07.2014 um 17:06 in Nachricht
<53C694E1.2030705@symas.com>:
> Marco Pizzoli wrote:
>> Hi Ulrich,
>> yes but leveraging the "copytruncate" option of logrotate. So you don't have
>> to worry about the open state of the file.
>
> Or just read the auditlog source code and see what it does. This is one of
> the
> reasons that open source projects are open source.
Hi!
..and I always thought open source is solely to avoid writing manual pages...
Well, actually I think auditlog without the ability to start a new file is rather useless other than for short interval debugging.
Well, maybe I could try to direct the logfile to a named pipe and pull the output from there.
Would it be so hard to implement a simple log rotate pattern in the overlay (like that named/bind has for many years)?
---
The file destination clause directs the channel to a disk file. It
can include limitations on both the file size and the number of
versions of the file that are saved each time the file is opened.
If you use the versions log file option, then named will retain that
many backup versions of the file by renaming them when opening.
[...]
channel "an_example_channel" {
file "example.log" versions 3 size 20m;
print-time yes;
print-category yes;
};
---
Regards,
Ulrich
>>
>> HTH
>> Marco
>>
>>
>> On Wed, Jul 16, 2014 at 3:54 PM, Ulrich Windl
>> <Ulrich.Windl@rz.uni-regensburg.de <mailto:Ulrich.Windl@rz.uni-regensburg.de>>
>> wrote:
>>
>> Hi!
>>
>> The manual does not say whether the file auditlog uses is kept open all
>> the time, or is opened whenever a record is added. The difference is
>> important if you want to use logrotate to rotate the auditlog file. I
>> don't want to restart slapd when rotating the logs. That would be
> overkill.
>> Has anybody done this with success?
>>
>> Regards,
>> Ulrich
>>
>>
>>
>>
>
>
> --
> -- Howard Chu
> CTO, Symas Corp. http://www.symas.com
> Director, Highland Sun http://highlandsun.com/hyc/
> Chief Architect, OpenLDAP http://www.openldap.org/project/