Article ID: 121792, created on May 28, 2014, last review on May 28, 2014

  • Applies to:
  • Business Automation

Question

Logging to centralized server was configured according to documentation, but all logs are stored in one file. Is it possible to store logs in separate files like in PBA-E application server?

Answer

Rsyslog(which is shipped with Centos 6 by default) has mechanism called RainerScript for filtering of incoming message. To configure logs to be stored in separate files:

  1. Configure system logging according to documentation.
  2. Add the following line to /etc/rsyslog.conf on log server for each container:

    if $syslogfacility-text == 'local7' and $programname == '<container_name_in_capital_letters>' then /var/log/<container_name>.log
    
  3. Restart rsyslog:

    /etc/init.d/rsyslog restart
    

Now all log entries for container you specified will be written to file you specified.

For example for BM container the line will look the following way:

    if $syslogfacility-text == 'local7' and $programname == 'BM' then /var/log/BM.log

Note: for amt/atm container please specify _amt_service_ for programname parameter.

Search Words

separate files

syslog

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF