From nobody Sat Mar 25 20:15:42 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 4PkVjV4q3zz41fG5 for ; Sat, 25 Mar 2023 20:17:02 +0000 (UTC) (envelope-from parv.0zero9@gmail.com) Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PkVjV2mfLz3mCH for ; Sat, 25 Mar 2023 20:17:02 +0000 (UTC) (envelope-from parv.0zero9@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yb1-xb2b.google.com with SMTP id e65so6101372ybh.10 for ; Sat, 25 Mar 2023 13:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679775421; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Dd0/CN+z7KnMtVBNaCHhOGYiOXhh4bv6+5eZ4KFLihw=; b=KtJDSx8CpcdEaTW3XZ6QeC0QGNqFEsySTu5KWYw18Kvb+xt55cLIeoexIBWA/8qDVU 2Gb5y+S79PtMXQtwVj/sNrs5KDPpvoYhNuCChU+fy8RCWuy8arawceXUSlkSVvTdovj7 /7ddKYptZzhIa6+2pXhDmoq57+ozk+fBJpU+o1K/LjBeEDXJAmEYlu66WXnBcqMz9pUl dpM24XsQFIY4SVxaQS0VtyUvyrcLwkwWjUGGLYmgS9mdo+adAGAZEs3cMF/GPa82TgmQ FYUHckF0iv5EtsniXnbXxwvgg28/BkD/sDYKFFqWYS2TnheetrJm+jIqAQqvnxSxD6/q 892Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679775421; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Dd0/CN+z7KnMtVBNaCHhOGYiOXhh4bv6+5eZ4KFLihw=; b=r5Kpu3BZYsk1W9vKp/hpmAzqgvR++HimcYaAtSzmESyUpBFwNvkxcW16RvNM/J8jAg Gu8C9+2QbTdUOEVM8YgSalLppUMbhZpTFKu4kGwYH6tjmOPm2UZDajx9YGpFsFTAbJvk pS4LCskh7BhBGDhJ3UdKoznkDkPKVZoM1rRCvkr2redFpwcdtjhPiPsUxQIkDTeIcLYv cIlLsOYexlzJ36S828QzOqt9H/GvxiYAYb0Lw6MAgge7lCbK9/RZmLYW25nTX6hJkk8g TfbK23TdluiOqli3rodpg/6YTXuxaezH8SUSgvXUiF3dYLBb/zPEcacsbp1cmD5YMLj9 vJnQ== X-Gm-Message-State: AAQBX9flj0zmPcKR4ANHGxqh86v082IogA61k+2fMwwT0MGohfSlTX03 sBhFRc+xTMM4ewoCLGUGH772TusOozCyDhXJCyoDCpZnICg= X-Google-Smtp-Source: AKy350Y3MD8RVlYrVH5ORoTuUw3Bc1AqcouL1GJyhwns2s4g3k8gE7s0YM/Pf/0RG86q4L67pYxSaCQgOUPsiwjBstI= X-Received: by 2002:a05:6902:168d:b0:b6d:1483:bc18 with SMTP id bx13-20020a056902168d00b00b6d1483bc18mr3894926ybb.7.1679775421178; Sat, 25 Mar 2023 13:17:01 -0700 (PDT) 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 References: <20230325195752.6184c295.freebsd@edvax.de> In-Reply-To: <20230325195752.6184c295.freebsd@edvax.de> From: "parv/FreeBSD" Date: Sat, 25 Mar 2023 10:15:42 -1000 Message-ID: Subject: Re: Remove newsyslog messages from logs To: Polytropon Cc: Carlos Lopez , "freebsd-questions@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000048270005f7bf31a0" X-Rspamd-Queue-Id: 4PkVjV2mfLz3mCH X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[freebsd] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --00000000000048270005f7bf31a0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Mar 25, 2023 at 8:58=E2=80=AFAM Polytropon wrote: > 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? > Thanks you, Carlos, for asking the question. That had bothered me when log files had been too small. These days I just set the file size large enough; do not care for the (newsyslog) defaults anyway. > 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 > ^ > ... Thanks Polytropon; had not realized that that could be one way. - parv --00000000000048270005f7bf31a0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Mar 25, 2023 at 8:58=E2=80=AFAM Polytropon=C2= =A0 wrote:
On Sat, 25 Mar 2023 18:07:11 +0000, Carlos Lopez wr= ote:
> 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?

Thanks you, Carlos, for asking th= e question. That had bothered
me when log files had been too small.

These days I just set the fi= le size large enough; do not care
for the (newsyslog) defaults anyway.

=C2=A0
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=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 644=C2=A0 5=C2= =A0 =C2=A0 =C2=A0100=C2=A0 *=C2=A0 =C2=A0 =C2=A0JCB
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
...

=
Thanks P= olytropon; had not realized that that could be one
way.


- parv
--00000000000048270005f7bf31a0--