From nobody Sat Mar 25 18:57:52 2023 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PkSyH2YKxz41Z5v for ; Sat, 25 Mar 2023 18:57:59 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "Telekom Security ServerID OV Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PkSyG5tf0z3KN5 for ; Sat, 25 Mar 2023 18:57:58 +0000 (UTC) (envelope-from freebsd@edvax.de) Authentication-Results: mx1.freebsd.org; none Received: from r56.edvax.de ([178.12.33.149]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPA (Nemesis) id 1MSLhm-1q4Jnk3Rfc-00Sjap; Sat, 25 Mar 2023 19:57:52 +0100 Date: Sat, 25 Mar 2023 19:57:52 +0100 From: Polytropon To: Carlos Lopez Cc: "'freebsd-questions@freebsd.org'" Subject: Re: Remove newsyslog messages from logs Message-Id: <20230325195752.6184c295.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:sSODKbSJ47+yk4vk6SDpTkT+il4WnQVGzn2fNjGy39CQCCLfWiT Mcg2GpltGex79uiL2seq5D+mII6StljTC/n0NxrpQRqbnzh18QUTFlH01qeKNBvlVOYopaZ PdDE+AK2CvIjZjLI/WGz1XrTyRlpdRMS/nEYBwrvSlNTq+7YH06vXrECc0+SWVhk4Co8iri nGPDLtWSKyWMnGS6yZpGw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:T8OqgJ92bAg=;ayg4IsCVx0Ht0ycZz9z9kcAWOyf P+6ugWhZYd06rU9a2HlfP56uDpWaW9dF6eLZ9U9Ld5MbmHyUcisl5qw6xBucKaWgWYksahf2b tK9j7l2UA3T/yjqb20Z27uBWPf/VMcOcjiJwxkvgG6Q0dnMGbM/bygboD6ekofXI+mTi/092f gt0AWZykl4OaPaAErPhGIBpbUlPvFDkJn3TjPt2QB1dhVDsGBeyTa9tLUJ7vVDHtY/mbjH+Tb FcIIrzB2xxx334PrrRM5jjNoB29hku0Vo2IM6zwU5Khkt5r56JXV2s5/GGcsdnlm5uU79pI8r s55cNbIhC8juW410gwCnqMIlNIW+YwaeOWAr05XrJZhZAvS5agIuQy2v8vGcWENe0I2PuHQ+8 jt1SlKAyMeQPvMWbGfIqxh6tpcBHsUuT5/N1PrEMopUTe2oCI7e4h0J4gG+ExZQ9UTmPBjeY/ tLJmVFrkZJOPs44tuOStRmtGBCdxjXEJb/HzY2HxXcmiVXS+M+n62y/P9Em9qEn6goteNugdm T+chPjSev+qi28iW3AHuEqbZrcfMDmcEEDhZCCppiQnnUDbAB2Bp/xBHbyS4PXoGgqjlzSX0b GWrkgjtcEoLqC/Jg8ync9HhT9BYaAgSVk1/LdI3q8kHZg3BkQfFKlHKDLbgZvAN/YQ+FGVosl hcKquUWpAA188TFxhr13N4KHI7bXJhLe4Sl78Rqf2g== X-Rspamd-Queue-Id: 4PkSyG5tf0z3KN5 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, 25 Mar 2023 18:07:11 +0000, Carlos Lopez wrote: > Maybe it is a stupid question, [...] Not at all. > [...] but would it be possible to > delete/avoid "newsyslog[1137]: logfile turned over due to > size>..." messages generated by newsyslog every time it > rotates a log file? Yes, this is supported. Just have newsyslog pretend the log file in question is a binary log file, so the insertion of the message will be suppressed. Set the `B' flag (field #7) in /etc/newsyslog.conf, for example: /var/log/messages 644 5 100 * JCB ^ Files that typically have this flag are /var/log/pflog, /var/log/sendmail.st, or /var/log/wtmp, as they are binary files. But it should work with text files, too. See "man 5 newsyslog.conf" for details. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...