novell-afptcpd information also logged in /var/log/messages

  • 7004133
  • 10-Aug-2009
  • 27-Apr-2012

Environment

Novell Open Enterprise Server 2 (OES 2) Linux
SUSE Linux Enterprise Server 10 Service Pack 1
SUSE Linux Enterprise Server 10 Service Pack 2


Situation

Messages regarding novell-afptcpd are written in/var/log/messages
Messages regarding novell-afptcpd are also written in /var/log/afptcpd/afptcp.log

Resolution

novell-afptcpd is usingsyslog-ng for its logging. By default syslog-ng always writes messages in both /var/log/messages and the log file specified for the service (for novell-afptcpd this is:destination d_afptcpd {file("/var/log/afptcpd/afptcp.log") ).

syslog-ng can be configured to not write messages to /var/log/messages. For novell-afptcpd you need to perform the following steps:
  1. edit the file /etc/syslog-ng/syslog-ng.conf.in
    (never edit syslog-ng.conf. This file will be recreated when you run a SuSEconfig)
  2. look for the line starting with: filter f_messages   {
    in a just installed system the complete line looks like:
    filter f_messages (not facility(news, mail) and not filter(f_iptables); };
  3. before the ; } ; in this line, add the following:
    and not filter(f_afptcp)
  4. save the file.
  5. run the following command:
    /sbin/SuSEconfig --verbose --module syslog-ng
  6. followed by:
    rcsyslog reload

Additional Information

If you receive the an error while running SuSEconfig, it might be that you have forgotten to run a /opt/novell/afptcpd/bin/upgrade_afp.sh after applying the latest novell-afptcpd or you have not installed novell-afptcpd at all on this server. You will be missing all lines regarding novell-afptcpd in the /etc/syslog-ng/syslog-ng.conf.in file.

The error looks like:
Executing /sbin/conf.d/SuSEconfig.syslog-ng...
Checking //etc/syslog-ng/syslog-ng.conf.SuSEconfig file: syntax error at 77
Parse error reading configuration file, exiting. (line 77)
Please correct the //etc/syslog-ng/syslog-ng.conf.in file.

The missing lines for novell-afptcpd in /etc/syslog-ng/syslog-ng.conf.in are:
filter f_afptcp {match('^afptcp');};
destination d_afptcpd {file("/var/log/afptcpd/afptcp.log");};
log {source(src); filter (f_afptcp); destination (d_afptcpd);};