How do I configure SYSLOGD in my Linux box to create a debug log?
Posted by Bob Puckett, Last modified by Danny Staub on 15 November 2017 04:07 PM
On the Patton you need to do the following: |
The following instructions are valid for Rehat Linux V6.2. The commands may be slightly different for your version of Unix/Linux. On the Linux machine, if syslogd is running it will automatically start logging information to the /var/log/messages. If you want that information to go to a separate file as indicated by selecting the Unix facility above then do the following:
- Go to System Log->Modify.
- Set IP address for Syslog Daemon to the IP address of the machine running syslogd. Select Submit Query
- Set minimum priority for syslog daemon to the desired level of logging. The lower the number next to the option the more information you get. Verbose is quite verbose. Debug is also probably more logging than you want. Select submit query.
- If you want the messages to go into a separate file called local1-local7 then you set the Unix Facility.
- Go to /etc and edit syslog.conf.
To log messages to local1.log add the following line:
local1.* /var/log/local1.log For each of local1-local7 you would need to add a line like the one above.
- Stop and start syslogd. To kill the process type: $ killall syslogd Restart syslogd by going to /sbin and typing: $ ./syslogd or just $ syslogd from any directory if you have /sbin in your path.
- Create an empty file for syslogd to write messages to: cd /var/log
touch local1.log You would need to touch each localx file you will have syslogd write messages to.