From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/2417 Path: news.gmane.org!.POSTED!not-for-mail From: "Laurent Bercot" Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: Log rotation issue with runit Date: Thu, 27 Dec 2018 11:41:13 +0000 Message-ID: References: <20181226015822.GH29946@home.lan> Reply-To: "Laurent Bercot" NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1545910749 22445 195.159.176.226 (27 Dec 2018 11:39:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 27 Dec 2018 11:39:09 +0000 (UTC) User-Agent: eM_Client/7.2.33939.0 To: supervision@list.skarnet.org Original-X-From: supervision-return-2007-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Dec 27 12:39:05 2018 Return-path: Envelope-to: gcsg-supervision@m.gmane.org Original-Received: from alyss.skarnet.org ([95.142.172.232]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1gcU0F-0005iv-Jd for gcsg-supervision@m.gmane.org; Thu, 27 Dec 2018 12:39:03 +0100 Original-Received: (qmail 7551 invoked by uid 89); 27 Dec 2018 11:41:40 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Original-Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7541 invoked from network); 27 Dec 2018 11:41:40 -0000 In-Reply-To: X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrtddvgddvkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfpfgfogfftkfevteeunffgpdfqfgfvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgjfhhrfgggtgfgsehtqhertddtreejnecuhfhrohhmpedfnfgruhhrvghnthcuuegvrhgtohhtfdcuoehskhgrqdhsuhhpvghrvhhishhiohhnsehskhgrrhhnvghtrdhorhhgqeenucfrrghrrghmpehmohguvgepshhmthhpohhuthenucevlhhushhtvghrufhiiigvpedt Xref: news.gmane.org gmane.comp.sysutils.supervision.general:2417 Archived-At: >Why would it be wrong to just keep appending to `current' instead of >moving it to `.u' file? (see my patch at end of bug thread) On a crash, it is possible that a file you're writing to gets corrupted. For the integrity of your logs, it's better to move that potentially corrupted file to another place and start over. If loggers kept appending to "current" instead, it could have corrupt information in the middle of a "current" file, which would them be archived as a .s (intact file), which wouldn't be good. Please don't change that behaviour - it's correct. Loggers should not be repeatedly crashing and wiping out your existing logs by excessive rotations. If you have a repeatedly crashing logger, something is wrong in your installation (or the way you built the logger). However, if you cannot trust your installation, a workaround is to use s6-log, which is very similar to svlogd and understands a "S" directive, meaning "total size of archived files in the directory". Using a large "n" value (maximum number of archived files) and an appropriate "S" value will keep all your logs even in the case of repeated crashes - which will not happen with s6-log. -- Laurent