English | Dansk
Skip Navigation Links.
 
 
 
 
 
 
 
 
 

Integrates UptoLog Satellite in web service applications

This describes how UptoLog Satellite is integrated into a .NET web service application. Subsequently it is possible to use UptoLog Satellite logging functionality.

Includes UptoLog Satellite

After UptoLog Satellite is installed on the development client, the UptoLog Satellite component is found under: Windows Start menu --> UptoLog Satellite --> UptoLog Satellite library.

UptoLog Satellite is added to a project by creating a component folder in the project and copying the two files UptoLog.Satellite.dll and UptoLog.Satellite.xml to the folder. Afterwards a reference to UptoLog.Satellite.dll is created in the project(s), which should use UptoLog Satellite.

Configuring UptoLog Satellite in web.config

It is configured what UptoLog Log Server that will receive logs and which types of logs that are active. The logging is only performed and sent if the relevant type of log is active.

UptoLog Satellite configuration section is included in the configuration element in the web.config file as follows:
<configSections>
 <section name="UptoLog.Satellite.LogSettings"
  type="UptoLog.Satellite.LogSettings,
   UptoLog.Satellite, Version=3.0.1.7, Culture=neutral,
   PublicKeyToken=37b0981e88140c28
"
/>
</configSections>

The UptoLog Log Servers url and what types of logs that are active are configured in the UptoLog.Satellite.LogSettings element in the web.config file as follows:
<UptoLog.Satellite.LogSettings>
 <logServer url="http:// <!-- your server --> /UptoLog-LogServer/" />
 <consumerType type="Server" />
 <fatalError logActive="true" />
 <error logActive="true" />
 <warning logActive="true" />
 <timeMeasure logActive="true" />
 <trace logActive="true" />
</UptoLog.Satellite.LogSettings>

If time measurements are created in a web service application, UptoLog Satellite can add a time measurement for the start and stop of http requests. This functionality is configured by using the http module HttpLogModule.
It is configured in the system.web element in the web.config file as follows:
<system.web>
 <httpModules>
  <add name="UptoLog.Satellite"
    type="UptoLog.Satellite.HttpLogModule,
    UptoLog.Satellite, Version=3.0.1.7, Culture=neutral,
    PublicKeyToken=37b0981e88140c28
" />
 </httpModules>
</system.web>

Logging errors

Application errors are logged in every single web service, which advantageously can be done in the outer web service method.

.NET does not however directly support general exception handling in web service applications and unhandled exceptions can not be logged in Global.asax. If a general exception handling is wanted in a web service application, it is necessary to implement this functionality.

Activities in UptoLog

When a web service is called by a client (a consumer), the web service request is part of a activity which is started outside the web service. It is therefore necessary to send the activity id with the web service call and hand it to UptoLog Satellite. This enables UptoLog Satellite to log activity relations.

The activity id is handed to UptoLog Satellite as follows:
Log.CurrentActivityId = someActivityId; // A activity id.

If not UptoLog Satellite is updated with an activity id, every request is treated as a new activity, which means that UptoLog Satellite creates a new activity id for every request.


UptoLog ApS - Aagade 17, 3 th - 9000 Aalborg - Denmark - Phone: +45 26812660 - E-mail: support@uptolog.com - CVR-number: 30 59 65 01