Application Logging

An administrator can configure how Exago handles logging in order to change or extend functionality.

Logging Defaults

By default Exago saves a log file called ‘WebReportsLog.txt’ to the application’s Temp path (specified in ‘WebReports.xml’). The logger maintains a lock on the file for the lifespan of the application. The log file cannot be edited or deleted without restarting the application.

There are three configurable verbosity levels for the logger. By default, Exago runs at the Info level.

  • Error – Only logs error messages in the application.
  • Info – Logs SQL statements, number of rows returned from each statement, and report execution information, as well as all Error
NOTE. Report execution information includes the following:

On execution start: Start time, userId, companyId, full report name, filter summary.

On execution end: End time, runtime, userId, companyId, full report name.

  • Debug – Logs a variety of debugging information that can be used to time specific parts of the app, as well as all Info and Error

The logger can load its configuration from a file and continually watch the file for changes. A config file can be used to lock or unlock the log file, as well as to customize and extend logging capability.

To create a custom config file, create a file called ‘log4net.config’ in the Config directory of the Exago application. The following shows a sample config file:

<?xml version="1.0" encoding="UTF-8"?>
   <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
      <file value="C:\Exago\Temp\WebReportsLog.txt" />
      <encoding value="utf-8" />
      <appendToFile value="true" />
      <rollingStyle value="Size" />
      <maxSizeRollBackups value="10" />
      <maximumFileSize value="1MB" />
      <staticLogFileName value="true" />
      <lockingModel type="log4net.Appender.FileAppender+ExclusiveLock" />
      <layout type="log4net.Layout.PatternLayout">
         <conversionPattern value="%date %-5level [%property{SessionId}] %message%newline" />
   <!-- Setup the root category, add the appenders and set the default level -->
      <level value="INFO" />
      <appender-ref ref="RollingFileAppender" />

Custom Logging

Exago uses Apache Log4Net to handle custom logging. For more information and extensibility features, see: Apache log4net. See the following examples for some simple modifications:

Changing Logfile Location

<file value="Path\To\Log.txt" />

Specifies the directory and filename for the log file.

Changing Logging Level

<level value="INFO" />

Specifies the Exago logging level: ERROR, INFO, or DEBUG.

Unlocking the Log File

<lockingModel type="log4net.Appender.FileAppender+ExclusiveLock" />

Configures the locking model in use for the log file. To temporarily disable the write lock, you can use: log4net.Appender.FileAppender+MinimalLock

NOTE. This will result in a performance reduction until it is reset.

Hidden Article Information

Article Author
Alex Agoado
created 2015-12-15 18:46:57 UTC
updated 2016-01-05 21:01:27 UTC

log, logfile, log4net, logging, WebReportsLog.txt, custom logging, unlocking the log file,
Have more questions? Submit a request