Initial configuration

Logs and log rotation

by ross at 07:22:02 on October 28, 2011

/etc/syslog.conf defines system log files. /etc/newsyslog.conf defines rotation of the logs.

Create /var/log/all.log:

# touch /var/log/all.log
# chmod 600 /var/log/all.log

diff -u /usr/share/examples/etc/syslog.conf /etc/syslog.conf

--- /usr/share/examples/etc/syslog.conf 2008-09-27 00:22:12.000000000 +0300
+++ /etc/syslog.conf    2008-09-26 23:00:25.000000000 +0300
@@ -19,7 +19,7 @@
 #console.info                                  /var/log/console.log
 # uncomment this to enable logging of all log messages to /var/log/all.log
 # touch /var/log/all.log and chmod it to mode 600 before it will work
-#*.*                                           /var/log/all.log
+*.*                                            /var/log/all.log
 # uncomment this to enable logging to a remote loghost named loghost
 #*.*                                           @loghost
 # uncomment these if you're running inn

/etc/newsyslog.conf allready has entry to rotate /var/log/all.log.

 

Comments