The UAS runs several loggers. There will always be a logger for the application data records and the UAS itself. There will also be a logger for each cloud region connection, and a reference to this logger is passed to each application that is run by the connection.
The log files are limited to a maximum size, after which they roll over. Each time they roll over, the current log file is renamed by appending a number and a new log file is created. The oldest log file is the one with the highest number. The number of files that can be created is also limited. Once the limit on the number of files is reached, the oldest file is discarded.
The log file size and the maximum number of files can be set in the configuration file or on the UAS’s command line.
Several log levels are supported:
- debug will log everything.
- trace will log events like state changes.
- info will log the more significant events, such as when channels start and stop.
- report for essential information, such as an application terminating
- warning for when something unintended happens.
- error for when something bad happens.
The log level can be set in the configuration file or on the UAS’s command line.
The logger for the application data records will create files named UAS_ADR.log.
Each log line consists of two fields separated by a :.
The fields are:
The log message has a number of fields separated by a space:
Below are some examples:
2011-Jan-14 10:31:48,220 : Outbound dialouttest 35.4058 10:31:09 38.4 0 NA [sync many] [sip:mltest_dialintest@10.202.101.40]
2011-Jan-14 10:31:48,220 : Inbound dialintest 35.4067 10:31:10 37.5 0 [sip:35o4057o0@sip.mcast.net] [dialin]
The UAS logger will create files named UAS_Launcher.log.
Each log line consists of three fields separated by a :.
The fields are:
Below is an example:
2011-Jan-17 10:26:48,506 : info : Application dialintest [35.278] now owns primary channel [28]
The application loggers will create files called UAS_Channels_X.log, where X will be a code that identifies the cloud region connection.
Each log line consists of six fields, where the fields are separated by a :.
The fields are:
Below are some examples:
The first example shows a line written the the call channel object while it is being initialised. The context string is channel which identifies this line as coming from a call channel object. The function is __init__ which shows that the object is being constructed. The ID is 5, this is the internal call channel’s ID and is assigned automatically. The message tells us that the call channel is constructing a DTMF player:
2011-Jan-17 10:26:47,631 : __init__ : TRACE : channel : 5 : Init player prosody._dtmfplayer.DTMFPlayer 5
In the next example the context string identifies that an application called dialouttest is logging. The context string also identifies the connection and the application with a unique ID:
2011-Jan-17 10:26:47,647 : start_call : DEBUG : dialouttest 35_262 : 5 : sip:mltest_dialintest@10.202.101.40 from 35o262o0
The final example’s ID field is N. This is a special ID that represents the object that deals with the call channels and is responsible for the socket connection. The context string identifies the connection:
2011-Jan-17 10:26:47,647 : _putMsg : DEBUG : 35 : N : Socket sent: '<LF^0^S^sip:mltest_dialintest@10.202.101.40^35o262o0^5^#35.262#35.262\n'