Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CA35E97E0 for ; Tue, 27 Mar 2012 11:44:55 +0000 (UTC) Received: (qmail 96706 invoked by uid 500); 27 Mar 2012 11:44:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 96648 invoked by uid 500); 27 Mar 2012 11:44:54 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 96639 invoked by uid 99); 27 Mar 2012 11:44:54 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 11:44:54 +0000 Received: from localhost (HELO mail-iy0-f180.google.com) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Mar 2012 11:44:53 +0000 Received: by iage36 with SMTP id e36so12806141iag.11 for ; Tue, 27 Mar 2012 04:44:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.43.126.68 with SMTP id gv4mr14871593icc.30.1332848693198; Tue, 27 Mar 2012 04:44:53 -0700 (PDT) Received: by 10.42.99.195 with HTTP; Tue, 27 Mar 2012 04:44:53 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Mar 2012 12:44:53 +0100 Message-ID: Subject: Re: Cycling log files From: Robert Newson To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 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 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 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 wrote: >>>> >>>> Hi all, >>>> >>>> Is there a way to cycle the CouchDB log file, or set up a maximum size for it? >>>> >>>> Thanks, >>>> >>>> Martin >>>> >>>