You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Martin Hewitt <ma...@thenoi.se> on 2012/03/27 13:31:02 UTC

Cycling log files

Hi all,

Is there a way to cycle the CouchDB log file, or set up a maximum size for it? 

Thanks,

Martin


Re: Cycling log files

Posted by Robert Newson <rn...@apache.org>.
CouchDB builds a logrotate script already, of the form;

/usr/local/var/log/couchdb/*.log {
       weekly
       rotate 10
       copytruncate
       delaycompress
       compress
       notifempty
       missingok
}

The actual path varies based on your install dir, of course. The
'copytruncate' option is the most important as couchdb  keeps the log
file open at all times.

B.

On 27 March 2012 12:38, Jonathan Williamson <jo...@netcopy.co.uk> wrote:
> No problem. CentOS uses logrotate as well I think, that will
> definitely sort you out.
>
> On Tue, Mar 27, 2012 at 12:35 PM, Martin Hewitt <ma...@thenoi.se> wrote:
>> Ah, thanks Jon, that looks useful. I'm on CentOS, but I wasn't sure if there was something built-in to CouchDB to do this.
>>
>> Will give that a whirl, thanks!
>>
>> Martin
>>
>> On 27 Mar 2012, at 12:33, Jonathan Williamson wrote:
>>
>>> Hi Martin,
>>>
>>> What platform are you on? Can you use standard log rotation? On
>>> Ubuntu/Debian you'd do something like:
>>>
>>> sudo ln -s /usr/local/etc/logrotate.d/couchdb /etc/logrotate.d/couchdb
>>>
>>> On Tue, Mar 27, 2012 at 12:31 PM, Martin Hewitt <ma...@thenoi.se> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> Is there a way to cycle the CouchDB log file, or set up a maximum size for it?
>>>>
>>>> Thanks,
>>>>
>>>> Martin
>>>>
>>>

Re: Cycling log files

Posted by Jonathan Williamson <jo...@netcopy.co.uk>.
No problem. CentOS uses logrotate as well I think, that will
definitely sort you out.

On Tue, Mar 27, 2012 at 12:35 PM, Martin Hewitt <ma...@thenoi.se> wrote:
> Ah, thanks Jon, that looks useful. I'm on CentOS, but I wasn't sure if there was something built-in to CouchDB to do this.
>
> Will give that a whirl, thanks!
>
> Martin
>
> On 27 Mar 2012, at 12:33, Jonathan Williamson wrote:
>
>> Hi Martin,
>>
>> What platform are you on? Can you use standard log rotation? On
>> Ubuntu/Debian you'd do something like:
>>
>> sudo ln -s /usr/local/etc/logrotate.d/couchdb /etc/logrotate.d/couchdb
>>
>> On Tue, Mar 27, 2012 at 12:31 PM, Martin Hewitt <ma...@thenoi.se> wrote:
>>>
>>> Hi all,
>>>
>>> Is there a way to cycle the CouchDB log file, or set up a maximum size for it?
>>>
>>> Thanks,
>>>
>>> Martin
>>>
>>

Re: Cycling log files

Posted by Martin Hewitt <ma...@thenoi.se>.
Ah, thanks Jon, that looks useful. I'm on CentOS, but I wasn't sure if there was something built-in to CouchDB to do this.

Will give that a whirl, thanks!

Martin 

On 27 Mar 2012, at 12:33, Jonathan Williamson wrote:

> Hi Martin,
> 
> What platform are you on? Can you use standard log rotation? On
> Ubuntu/Debian you'd do something like:
> 
> sudo ln -s /usr/local/etc/logrotate.d/couchdb /etc/logrotate.d/couchdb
> 
> On Tue, Mar 27, 2012 at 12:31 PM, Martin Hewitt <ma...@thenoi.se> wrote:
>> 
>> Hi all,
>> 
>> Is there a way to cycle the CouchDB log file, or set up a maximum size for it?
>> 
>> Thanks,
>> 
>> Martin
>> 
> 
> 
> 
> --
> Jon
> 
> Jonathan Williamson
> Systems Architect
> :::::::::::::::::::::::::::::::::::::::::::
> +44 (0) 7843 301 246  mobile
> +44 (0) 208 242 6364  switch
> 
> www.netcopy.co.uk
> ::::::::::::::::::::::::::::::::::::::::::
> 
> IMPORTANT NOTICE:
> ========================================================================================
> Netcopy Limited is a Company registered in England and Wales under
> Company No. 07308350
> Registered office: 2 East Common, Harpenden, Herts, AL5 1BJ
> The contents of this email (and any attachment):
> (1) are confidential and may be legally privileged - if it is not
> meant for you, please tell the sender, do not forward or copy the
> contents and delete it from your system immediately;
> (2) come from its author and may not necessarily reflect the opinions
> of Netcopy Ltd.
> While emails and attachments are virus checked, we cannot accept any
> liability in respect of any viruses.
> We may monitor emails sent to Netcopy.
> Want to know more about Netcopy?
> Visit our website: www.netcopy.co.uk


Re: Cycling log files

Posted by Jonathan Williamson <jo...@netcopy.co.uk>.
Hi Martin,

What platform are you on? Can you use standard log rotation? On
Ubuntu/Debian you'd do something like:

sudo ln -s /usr/local/etc/logrotate.d/couchdb /etc/logrotate.d/couchdb

On Tue, Mar 27, 2012 at 12:31 PM, Martin Hewitt <ma...@thenoi.se> wrote:
>
> Hi all,
>
> Is there a way to cycle the CouchDB log file, or set up a maximum size for it?
>
> Thanks,
>
> Martin
>



--
Jon

Jonathan Williamson
Systems Architect
:::::::::::::::::::::::::::::::::::::::::::
+44 (0) 7843 301 246  mobile
+44 (0) 208 242 6364  switch

www.netcopy.co.uk
::::::::::::::::::::::::::::::::::::::::::

IMPORTANT NOTICE:
========================================================================================
Netcopy Limited is a Company registered in England and Wales under
Company No. 07308350
Registered office: 2 East Common, Harpenden, Herts, AL5 1BJ
The contents of this email (and any attachment):
(1) are confidential and may be legally privileged - if it is not
meant for you, please tell the sender, do not forward or copy the
contents and delete it from your system immediately;
(2) come from its author and may not necessarily reflect the opinions
of Netcopy Ltd.
While emails and attachments are virus checked, we cannot accept any
liability in respect of any viruses.
We may monitor emails sent to Netcopy.
Want to know more about Netcopy?
Visit our website: www.netcopy.co.uk