Configure Default System Log Properties
You specify properties that control how system log messages are generated for the interface as a whole. If you configure different values for the same properties at the [
edit services service-setservice-set-name] hierarchy level, the service-set values override the values configured for the interface. For more information on configuring service-set properties, see Configure System Log Properties.To configure interface-wide default system logging values, include the
syslogstatement at the [edit interfacesinterface-nameservices-options] hierarchy level:[editinterfacesinterface-nameservices-options]syslog {hosthostname{servicesseverity-level;facility-overridefacility-name;log-prefixprefix-number;}}Configure the
hoststatement with a hostname that specifies the system log target server. The hostnamelocaldirects system log messages to the Routing Engine. For external system log servers, the hostname must be included ininet.0. You can specify only one system logging hostname.Table 10 lists the severity levels that you can specify in configuration statements at the [
edit interfacesinterface-nameservices-options syslog hosthostname] hierarchy level. The levels fromemergencythroughinfoare in order from highest severity (greatest effect on functioning) to lowest.
Table 10: System Log Message Severity Levels
We recommend setting the system logging severity level to
errorduring normal operation. To monitor PIC resource usage, set the level towarning. To gather information about an intrusion attack when an intrusion detection system error is detected, set the level tonoticefor a specific interface. To debug a configuration or log NAT functionality, set the level toinfo.For more information about system log messages, see the JUNOS System Log Messages Reference.
To use one particular facility code for all logging to the specified system log host, include the
facility-overridestatement at the [edit interfacesinterface-nameservices-optionssysloghosthostname] hierarchy level:[editinterfacesinterface-nameservices-optionssysloghosthostname]facility-overridefacility-name;The supported facilities include:
authorization,daemon,ftp,kernel,user, andlocal0throughlocal7.To specify an address prefix for all logging to this system log host, include the
log-prefixstatement at the [edit interfacesinterface-nameservices-optionssysloghosthostname] hierarchy level:[editinterfacesinterface-nameservices-optionssysloghosthostname]log-prefixprefix-number;