You can capture additional error messages that are generated by various system processes by modifying the /etc/syslog.conf file. By default, /etc/syslog.conf directs many system process messages to the /var/adm message files. Crash and boot messages are stored here as well. To view /var/adm messages, see "How to View System Messages".
The /etc/syslog.conf file has two columns separated by tabs:
facility.level ... |
action |
facility.level |
A facility or system source of the message or condition. May be a comma-separated listed of facilities. Facility values are listed in Table 68-2. Alevel, indicates the severity or priority of the condition being logged. Priority levels are listed in Table 68-3. |
action |
The action field indicates where the messages are forwarded. |
The following example shows sample lines from a default /etc/syslog.conf file.
user.err /dev/console user.err /var/adm/messages user.alert `root, operator' user.emerg * |
The most common error condition sources are shown in Table 68-2. The most common priorities are shown in Table 68-3 in order of severity.
Table 68-2 Source Facilities for syslog.conf Messages
Source |
Description |
---|---|
The kernel |
|
Authentication |
|
All daemons |
|
Mail system |
|
lp |
Spooling system |
User processes |
Starting in the Solaris 2.6 release, the number of syslog facilities that can be activated in the /etc/syslog.conf file is unlimited. In previous releases, the number of facilities was limited to 20.
Priority |
Description |
---|---|
emerg |
System emergencies |
alert |
Errors requiring immediate correction |
crit |
Critical errors |
err |
Other errors |
info |
Informational messages |
debug |
Output used for debugging |
none |
This setting doesn't log output |
Become superuser.
Using the editor of your choice, edit the /etc/syslog.conf file, adding or changing message sources, priorities, and message locations according to the syntax described in syslog.conf(4) .
Exit the file, saving the changes.
The following /etc/syslog.conf lines are provided by default during the Solaris installation process.
user.err /dev/console user.err /var/adm/messages user.alert `root, operator' user.emerg * |
This means the following user messages are automatically logged:
User errors are printed to the console and also are logged to the /var/adm/messages file.
User messages requiring immediate action (alert) are sent to the root and operator users.
User emergency messages are sent to individual users.