The airtime-log command
The airtime-log command provides convenient access to the logging output from the services which make up the Airtime system: media-monitor, recorder, playout, liquidsoap and web.
Using this command requires root privileges (sudo on Ubuntu). Entering the command without any options returns a list of options that you can specify:
sudo airtime-log
Usage: airtime-log [options]
--view|-v <string> Display log file
media-monitor|recorder|playout|liquidsoap|web
--dump|-d [ <string> ] Collect all log files and compress into a tarball
media-monitor|recorder|playout|liquidsoap|web (ALL by default)
--tail|-t [ <string> ] View any new entries appended to log files in real-time
media-monitor|recorder|playout|liquidsoap|web (ALL by default)
For example, to view the media-monitor log, you could use the command:
sudo airtime-log -v media-monitor
The server console will display something like the following output:
2011-11-29 09:32:45,750 INFO - [MainThread] [MediaMonitor.py : <module>()] : LINE 32 -
*** Media Monitor bootup ***
2011-11-29 09:32:45,864 INFO - [MainThread] [MediaMonitor.py : <module>()] : LINE 39 - Setting up monitor
2011-11-29 09:32:46,058 INFO - [MainThread] [api_client.py : setup_media_monitor()] : LINE 405 - Connected to Airtime Server. Json Media Storage Dir: {u'watched_dirs': [], u'stor': u'/srv/airtime/stor/'}
2011-11-29 09:32:51,061 INFO - [MainThread] [MediaMonitor.py : <module>()] : LINE 47 - Storage Directory is: /srv/airtime/stor/
2011-11-29 09:32:51,066 INFO - [MainThread] [MediaMonitor.py : <module>()] : LINE 54 - Initializing event processor
2011-11-29 09:32:51,364 INFO - [MainThread] [airtimemediamonitorbootstrap.py : scan()] : LINE 29 - watched directories
found: {u'1': u'/srv/airtime/stor/'}
Use the PageUp and PageDown keys on your keyboard to navigate through the log file, or press the q key to quit the viewer.
To dump all log files and compress them into a tarball placed in the working directory, you could add the -d switch to the command:
sudo airtime-log -d Creating Airtime logs tgz file at /root/logs/airtime-log-all-2011-11-29-12-43-20.tgz
To view just the Liquidsoap log output in real-time, you could enter the command:
sudo airtime-log -t liquidsoap Tail liquidsoap log2011/11/29 11:44:41 [fallback_4892:3] Switch to src_4890 with forgetful transition. 2011/11/29 11:44:41 [lang:3] /usr/lib/airtime/pypo/bin/liquidsoap_scripts/notify.sh --data='2' --media-id= 2011/11/29 12:10:06 [server:3] New client: localhost. 2011/11/29 12:10:06 [server:3] Client localhost disconnected. 2011/11/29 12:10:06 [server:3] New client: localhost. 2011/11/29 12:10:06 [server:3] Client localhost disconnected. 2011/11/29 12:10:29 [server:3] New client: localhost. 2011/11/29 12:10:29 [server:3] Client localhost disconnected. 2011/11/29 12:10:29 [server:3] New client: localhost. 2011/11/29 12:10:29 [server:3] Client localhost disconnected.
Press the Ctrl+C keys to interrupt the real-time log output and return to the server console.





