simple Echolink Logbook

A small Perl script [1] can be used to automatically create a small and simple logbook of the EchoLink connections. This script reads the SvxLink log and creates a logbook file in the configured directory.

Conditions:
– perl must be installed on your system.
– You must operate SvxLink in such a way that it writes the output to a log file. When you start SvxLink on the console, the output is NOT written to the SvxLink log file.

Installation:
1) Download the script and install it under e.g. /usr/bin
2) make the script executable with chmod 755 el_logbook.pl
3) Change the parameter TIMESTAMP_FORMAT=“%d.%m.%Y %H:%M:%S“ in svxlink.conf, so that the date/time entries are written in German notation.
4) in the script itself the paths for the svxlink-log and the logbook can be defined
5) If you want the logbook to be created automatically, you should either make an entry in the crontab or use logrotate.

a) by means of crond:
add an entry to /var/spool/cron/tabs/svxlink, e.g.:
0 0 * * * * /usr/bin/el_logbook.pl 1>/dev/null 2>/dev/null

Thus the creation takes place every day at 0 o’clock.

b) using logrotate:
The better and safer way is to use logrotate. Then a logbook is always created shortly before the SvxLink log file is rotated and no entries are lost! Here is an example for a logrotate entry (/etc/logrotate.d/svxlink):

/var/log/svxlink {
missingok
notifempty
daily
create 0644 svxlink daemon
prerotate
/usr/bin/el_logbook.pl
endscript
postrotate
killall -HUP svxlink
endscript
}

Downloads:
1] el_logbook (Perl required)