Part Number: AM4379
Our application use the syslog service to log information to "/var/log/messages". But we want to modify the log file size and rotation number, so that when the "messages" file size up to 1M, it can be rotated. And the rotate log file can be removed when "rotate" is 5(for example).
I have tried to modified the syslog.conf or syslog-startup.conf in the directory "/etc/"(as below), then restart the service, but it didn't work。
1.modify "syslog.conf" file
Add the following to the "syslog.conf" file:
/var/log/messages{
rotate 90
size 1M
olddir /var/log/smtserver_log
}
2. moidfy "syslog-startup.conf"
Uncomment the following: default: #ROTATESIZE=0 # rotate log if grown beyond X [kByte] #ROTATEGENS=3 # keep X generations of rotated logs modified: ROTATESIZE=1024 # rotate log if grown beyond X [kByte] ROTATEGENS=90 # keep X generations of rotated logs
So how should i do to config the syslog service for my purpose?
By the way, the rotate log filename extension is ".1", can it be storied with the current time as the filename extension?
My SDK version is v05.02.00.10.
Thanks and regards.