I would like to log all TFTP server logging messages (and only those) to a separate log file. I'm using xinetd (extended Internet daemon) in Linux to provide a TFTP server. I tried adding
log_type = SYSLOG local1
to /etc/xinetd.d/tftp and
local1.* /var/log/tftpd.log
to /etc/rsyslog.conf
but I only START and EXIT messages, such as
Jul 24 13:59:30 sail-staging xinetd[1364]: START: tftp pid=17955 from=x.x.x.x
Jul 24 14:17:03 sail-staging xinetd[1364]: EXIT: tftp status=0 pid=17955 duration=1053(sec)
Other log messages such as RRQ (which mentions the downloaded file) are still logged only to /var/log/messages.
Any help is much appreciated.
In /etc/xinetd.d/tftp, instead of setting log_type to SYSLOG, you can set it to FILE:
log_type = FILE <path_to_log_file>
This will normally log everything in the file whose path you specified.
(man xinetd.conf
for more info)