Logging within Atdl4net

Logging/tracing within Atdl4net is implemented using the open source Common.Logging project. Common.Logging supports a wide range of logging frameworks, including NLog, Log4net and System.Diagnostics, plus it provides an API to integrate with logging frameworks that aren't supported out of the box.

Word of warning: Some areas in the code trace quite a lot so please be careful when enabling traces at "Verbose" level or above, as this may result in Atdl4net appearing unresponsive when loading large ATDL files.

Logging is configured via the application configuration (App.config) file as follows:

 <sectionGroup name="common">
   <section name="logging"
            type="Common.Logging.ConfigurationSectionHandler, Common.Logging"
            requirePermission="false" />
   <factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging">
     <arg key="level" value="ALL" />

The example above shows logging to a console logger, although this is unlikely to be useful in the context of a WPF or WinForms application. More information on configuring Common.Logging can be found here.

The log sources (loggers in Log4net parlance) used by Atdl4net are as follows:
  • EditEvaluation
  • StateRules
  • Deserialization
  • ViewModel
  • Model
  • AtdlControl
  • ExceptionManagement

Last edited Nov 17, 2011 at 1:30 PM by Atdl4net, version 2


No comments yet.