Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 2023 10:15:42 -1000
From:      "parv/FreeBSD" <parv.0zero9+freebsd@gmail.com>
To:        Polytropon <freebsd@edvax.de>
Cc:        Carlos Lopez <clopmz@outlook.com>,  "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Re: Remove newsyslog messages from logs
Message-ID:  <CABObuOo43MngSjrpLU1zSRNg7_Jve_eHb=z8Rq6cO9P8PbAVsA@mail.gmail.com>
In-Reply-To: <20230325195752.6184c295.freebsd@edvax.de>
References:  <PRAP251MB05670CEF27342FF8C53C5002DB859@PRAP251MB0567.EURP251.PROD.OUTLOOK.COM> <20230325195752.6184c295.freebsd@edvax.de>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sat, Mar 25, 2023 at 8:58 AM 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

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace">On Sat, Mar 25, 2023 at 8:58 AM Polytropon  wrote:</div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, 25 Mar 2023 18:07:11 +0000, Carlos Lopez wrote:<br>
&gt; Maybe it is a stupid question, [...]<br>
<br>
Not at all.<br>
<br>
&gt; [...] but would it be possible to<br>
&gt; delete/avoid &quot;newsyslog[1137]: logfile turned over due to<br>
&gt; size&gt;...&quot; messages generated by newsyslog every time it<br>
&gt; rotates a log file?<br></blockquote><div><br></div><div style="font-family:monospace" class="gmail_default">Thanks you, Carlos, for asking the question. That had bothered</div><div style="font-family:monospace" class="gmail_default">me when log files had been too small.</div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default">These days I just set the file size large enough; do not care</div><div style="font-family:monospace" class="gmail_default">for the (newsyslog) defaults anyway.<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Yes, this is supported. Just have newsyslog pretend the log<br>
file in question is a binary log file, so the insertion of<br>
the message will be suppressed. Set the `B&#39; flag (field #7)<br>
in /etc/newsyslog.conf, for example:<br>
<br>
/var/log/messages            644  5     100  *     JCB<br>
                                                     ^<br></blockquote><div><div style="font-family:monospace" class="gmail_default">...</div></div><div><br></div><div style="font-family:monospace" class="gmail_default">Thanks Polytropon; had not realized that that could be one</div><div style="font-family:monospace" class="gmail_default">way.</div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default">- parv</div><div style="font-family:monospace" class="gmail_default"></div></div></div>
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABObuOo43MngSjrpLU1zSRNg7_Jve_eHb=z8Rq6cO9P8PbAVsA>