Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2017 03:30:08 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Chris Stankevitz <chris@stankevitz.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: passing -t to newsyslog
Message-ID:  <20170222033008.6550f098.freebsd@edvax.de>
In-Reply-To: <37474b63-e395-b1e2-6dcf-114dfaa36fc1@stankevitz.com>
References:  <37474b63-e395-b1e2-6dcf-114dfaa36fc1@stankevitz.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 21 Feb 2017 18:21:13 -0800, Chris Stankevitz wrote:
> Hi,
> 
> I want to pass -t to newsyslog so that archived log files have a useful 
> date/time suffix vs an obnoxious numeric suffix.
> 
> Apparently freebsd uses /etc/crontab to launch newsyslog.  The manual 
> tells me to not edit /etc/crontab [1]
> 
> How should I get my freebsd system to append date/time to archived 
> logfile names?

Configure newsyslog command line flags as intended by addind an
entry to /etc/rc.conf, for example:

	newsyslog_enable="YES"
	newsyslog_flags="-t <format>"

See /etc/defaults/rc.conf for newsyslog-related examples. Maybe
you also want to add the options -C and -N (which are the default
if you don't specify anything) because /etc/rc.conf will override
(instead of append to) the settings in /etc/defaults/rc.conf.
See "man rc.conf" and "man newsyslog" for details. There is
also /etc/newsyslog.conf for settings you might want to tweak.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170222033008.6550f098.freebsd>