Logging

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.

The log levels

Several log levels are supported:

  1. debug will log everything.
  2. trace will log events like state changes.
  3. info will log the more significant events, such as when channels start and stop.
  4. report for essential information, such as an application terminating
  5. warning for when something unintended happens.
  6. error for when something bad happens.

The log level can be set in the configuration file or on the UAS’s command line.

The ADR log file

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:

  1. The time and date.
  2. The log message.

The log message has a number of fields separated by a space:

  1. The application direction, inbound or outbound.
  2. The application name.
  3. The unique id for the application.
  4. The time that the application started.
  5. The duration in seconds.
  6. The return code.
  7. The caller line identification, between [], not applicable (NA) to outbound applications.
  8. The application arguments, between [].
  9. The outbound arguments, between [], not applicable to inbound applications.

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 log

The UAS logger will create files named UAS_Launcher.log.

Each log line consists of three fields separated by a :.

The fields are:

  1. The time and date.
  2. The line’s log level.
  3. The log message.

Below is an example:

2011-Jan-17 10:26:48,506 : info : Application dialintest [35.278] now owns primary channel [28]

The applications log

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:

  1. The time and date.
  2. The function that called the logger.
  3. The line’s log level.
  4. A context string.
  5. An ID.
  6. The log message.

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'

Table Of Contents

Previous topic

Understanding application data records

Next topic

Running the UAS management console