RE: Remove newsyslog messages from logs
- In reply to: Polytropon : "Re: Remove newsyslog messages from logs"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Mar 2023 06:46:47 UTC
Many thanks Polytropon .... Works perfectly!! Regards, C. L. Martinez -----Original Message----- From: Polytropon <freebsd@edvax.de> Sent: Saturday, March 25, 2023 19:58 To: Carlos Lopez <clopmz@outlook.com> Cc: 'freebsd-questions@freebsd.org' <freebsd-questions@FreeBSD.org> Subject: Re: Remove newsyslog messages from logs 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, ...