Appendix E. Log files
This appendix describes the log file format.
Bearerbox Access Log
2001-01-01 12:00:00 Sent SMS [SMSC:smsc] [SVC:sms] [from:12345]
[to:67890] [flags:0:1:0:0:0] [msg:11:Hello World] [udh:0]
Variable
Value
Description
Date
2001-01-01 12:00:00
Date
Result
Sent SMS
Result: Send, failed, DLR
(deliver report), Received, etc.
SMSC
smsc
Smsc id (
smsc-id
) defined in
configuration group
smsc
SVC
sms
Service name (
name
) defined in
configuration group
sendsms-user
from
12345
Sender
to
67890
Recipient
Flags
0:1:0:0:0
Flags: MClass, Coding, MWI,
Compress, DLRMask
Message Text
11:Hello World
Size of message and message
dump (in text or hex if it’s
binary)
User Data Header
0:
Size of UDH and UDH Hex
dump
Log rotation
If Kannel is configured so that the bearerbox, wapbox and/or smsbox log to file each of these log files
will continue to grow unless administered in some way (this is especially true if access logs are created
and/or the log level is set to debug).
A typical way of administering log files is to ’rotate’ the logs on a regular basis using a tool such as
logrotate. A sample logrotate script (to be added to /etc/logrotate.d) is shown below. In this example the
Kannel log files found in /var/log/kannel are rotated and compressed daily over 365 days. See the
documentation for logrotate for more details. Of particular note however is the postrotate command, this
killall -HUP issues a HUP command to each kannel box running. The HUP signal has the effect of
reopening the log file, without this command Kannel will continue to write to the rotated log file.
/var/log/kannel/*.log {
106