Click or drag to resize

Tracing in CommServer

Home
Tracing in CommServer

This is a modern technology based on .NET Framework, that provides a very simple and flexible method to trace a problem in runtime environment. For details about this technology please read Appendix B (Tracing).

Note Note

If you are not familiar with .NET Tracing technology it is strongly recommended to read the Appendix B (Tracing) first).

This chapter includes basic information how to setup tracing in CommServer.

To enable tracing in CommServer please modify the following configuration file ‘CASOpcDaWrapper.exe.config’, which is located in the installation folder (default location: ‘C:\Program Files\CAS.CommServer). This file is an XML file and can be edited by any text editor.

The section responsible for tracing is located between <system.diagnostics>’ and ‘</system.diagnostics>’. Default configuration is provided with three sources (this is first subsection – “sources”): TraceNet_to_Serial (responsible for network communication layer monitoring), NetworkConfig.ApplicationProtocol (responsible for tracing problem referred to configuration, plugins, etc…), System.Net.Sockets (responsible for tracing problems in Windows TCP/IP protocol stack). Next tracing section that the user can find is switches. After line: the user can specify different levels of details that he wants to display. The possible levels are: Off, All, Critical, Error, Verbose, Warning, and Information. For example, to obtain all information, replace ‘Off’ with ‘All’ in the default configuration. The last subsection is "sharedListeners". Here, the user can specify the name of destination listener (e.g. file name, default filenames are: ‘Net_to_Serial.log’ and NetworkConfig.log) where information is sent and the information filtering method (e.g.: All, Off, etc.). Files are created in the installation folder, but the user can specify the path where the file should be created (e.g. initializeData ="C:\Allcalc.log"). Tracing allows to receive information in different formats, e.g. please change ‘System.Diagnostics.DelimitedListTraceListener’ to one of options presented below:

  • ‘System.Diagnostics.XmlWriterTraceListener’ – generates XML file (name of the file with extension .xml)

  • ‘System.Diagnostics.TextWriterTraceListener’ – generates more user-friendly data output (extensions .log, .txt)

  • ‘System.Diagnostics.EventLogTraceListener’ – putting information to the system log

  • ‘System.Diagnostics.DelimitedListTraceListener’ – is a default option and it is very easy to import it to Microsoft Excel