English | Dansk
Skip Navigation Links.
 
 
 
 
 
 
 
 
 

Integrates UptoLog Satellite in web applications

This describes how UptoLog Satellite is integrated into a .NET web 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 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 unhandled exceptions

UptoLog Satellite should as a minimum log all unhandled exceptions, this is done by logging application errors in Global.asax.

Unhandled exceptions are logged as follows:
void Application_Error(object sender, EventArgs e)
{
 // Code that is run when an unhandled exception occurs.
 foreach (Exception exc in HttpContext.Current.AllErrors)
 {
  UptoLog.Satellite.Log.LogFatalError(exc); // Logged as a fatal error.
 }
}

Activities in UptoLog

UptoLog Satellite treats all requests to a web application as a separate activity and creates a new activity id for every request.

The activity id can be read in UptoLog Satellite as follows:
someActivityId = Log.CurrentActivityId;


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