このコンテンツは選択した言語では利用できません。
8.8.2. Enabling Syslog for Node Components
Note
/var/log/messages file by default. See the Red Hat Enterprise Linux 6 Deployment Guide for information on viewing and managing log files if using Rsyslog.
Procedure 8.4. To Enable Syslog for Apache:
- Configure Apache to send log messages to Syslog by adding the following option in the
/etc/sysconfig/httpdfile:OPTIONS="-DOpenShiftFrontendSyslogEnabled"
OPTIONS="-DOpenShiftFrontendSyslogEnabled"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Important
All options must be on the same line. For example, in Section 8.5.2, “Enabling Application and Gear Context in Node Component Logs” another option for Apache log files is explained. If both options are desired, the line must use the following syntax:OPTIONS="-Option1 -Option2"
OPTIONS="-Option1 -Option2"Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart the
httpdservice for the Apache changes to take effect:service httpd restart
# service httpd restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure 8.5. To Enable Syslog for the Node Platform:
- Configure the node platform to send log messages to Syslog by editing the
/etc/openshift/node.conffile. Add the following line and any or all of the described optional settings that follow:PLATFORM_LOG_CLASS=SyslogLogger
PLATFORM_LOG_CLASS=SyslogLoggerCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional Threshold Setting:Add the following line to include messages with priorities up to and including the set threshold. Replace
priorityin the following line with one of the levels listed at http://ruby-doc.org/stdlib-1.9.3/libdoc/syslog/rdoc/Syslog.html#method-c-log:PLATFORM_SYSLOG_THRESHOLD=priority
PLATFORM_SYSLOG_THRESHOLD=priorityCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional Trace Log Setting:Add the following line to include trace logs that were previously directed to the default
/var/log/openshift/node/platform-trace.logfile:PLATFORM_SYSLOG_TRACE_ENABLED=1
PLATFORM_SYSLOG_TRACE_ENABLED=1Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Restart the
ruby193-mcollectiveservice for the node platform changes to take effect:service ruby193-mcollective restart
# service ruby193-mcollective restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow - When Syslog support is enabled for the node platform, the
local0Syslog facility is used to log messages. By default, the/etc/rsyslog.conffile does not log platform debug messages. If you are using Rsyslog as your Syslog implementation, add the following line to the/etc/rsyslog.conffile to enable platform debug message logging. If necessary, replace/var/log/messageswith your chosen logging destination:local0.*;*.info;mail.none;authpriv.none;cron.none /var/log/messages
local0.*;*.info;mail.none;authpriv.none;cron.none /var/log/messagesCopy to Clipboard Copied! Toggle word wrap Toggle overflow Then restart thersyslogservice:service rsyslog restart
# service rsyslog restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow With this change, all log messages using thelocal0facility are sent to the configured logging destination.