8.7. Logging

mAirList allows you to keep track of the broadcasted files by maintaining customizable log files. Additionally, log information can directly be written to an SQL database. You can use the variables shown in Table 8.1, “Log variables” which are automatically expanded.

Table 8.1. Log variables

variablemeaning
%Ycurrent year (4 digits)
%Mcurrent month (2 digits)
%Dcurrent day (2 digits)
%hcurrent hour (24h format, 2 digits)
%mcurrent minute (2 digits)
%scurrent second (2 digits)
%1file name with path
%2file name without path
%3file name without path and extension
%aartist
%btitle
%cCueIn position (in mAirList units, 1/10,000,000 of a second)
%rRamp position (in mAirList units)
%oOutro position (in mAirList units)
%fFadeOut position (in mAirList units)
%Eend type
%ttab stop
%deffective broadcasted duration (in mAirList units, only available with stop logging)
%eeffective broadcasted duration (in seconds, only available with stop logging)

8.7.1. Start and Stop Logging

You can write a log file both when a song is started (for example, for an online playlist) and when it is stopped (for example, for accounting). Log variables may be used in both the file name and the log file format used for each log file entry.

8.7.2. Database Logging

Log entries may also be written to an SQL database. A number of common database servers are supported, but you need to copy the client DLL to your mAirList folder (for example, libmysql323.dll is the MySQL 3.23 client library, which can also be used to access version 4.x and 5.x servers). Select the appropriate database type and enter the connection information (host, database, user and password). Finally, enter an INSERT statement to be issued when an element is started or stopped, respectively. You can use any log variable. If you want to deactivate start or stop logging, leave the appropriate INSERT command field blank.

The database connection specified here is a special connection only used for logging, and does not interfere with the database connections used to access playlists and music archives (see Section 8.8, “Databases”).