Hi there,

I have the following rule in /etc/newsyslog.conf
var/log/*-access.log 644 12 24000 $W2D11 GZC /var/run/httpd.pid 30

I am trying to see if I can specify to rotate logs when they are larger then 24MB AND at the start of each month (for testing purposes I entered today at 11 o'clock - $W2D11).

However, at 10 o'clock the log should have been rotated because of size:
-rw-r--r--  1 root   wheel    24801986 Aug  5 10:02 domain.tld-access.log
but as you can see, it was not.

My question is how can I make sure the logs are rotated when they grow too large AND they are also rotated at a specified point in time (start of a new month).

I am reading man newsyslog.conf and it says:

If the when field contains an asterisk (`*'), log rotation will solely depend on the contents of the size field.

To me it seems to say that when it is not an asterisk (i.e. when I enter a date), the log rotation is not based solely on size factor, which in other words should mean it is also based on time?

Any help would be very much appreciated!

Thank you in advance!

--
Zbigniew Szalbot
www.LCWords.com

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to