Jump to: navigation, search

Difference between revisions of "HowTo:Configure Logging"


(Logging Categories)
Line 5: Line 5:
 
* The logging in {{UBIK}} Studio can be configured by editing the file '''UBIK.Studio.exe.config''', which is located in the program folder of {{UBIK}} Studio and also contains the section [[UBIK_Web_Service_Configuration_Example#loggingConfiguration|loggingConfiguration]] which can be configured in the same way like the {{UBIK}} Web Service.
 
* The logging in {{UBIK}} Studio can be configured by editing the file '''UBIK.Studio.exe.config''', which is located in the program folder of {{UBIK}} Studio and also contains the section [[UBIK_Web_Service_Configuration_Example#loggingConfiguration|loggingConfiguration]] which can be configured in the same way like the {{UBIK}} Web Service.
  
===Logging Categories===
+
==Logging Categories==
  
 
{{UBIK}} has different types of categories configured for the logging mechanism. The following categories can be configured in the configuration files. Categories with the remark '''internal''' are available via customizing code, but are used to log internal events. As it is not recommended to mix logging of internal events together with others, the two additional categories '''CUSTOMIZING''' and '''WORKFLOW''' have been created.
 
{{UBIK}} has different types of categories configured for the logging mechanism. The following categories can be configured in the configuration files. Categories with the remark '''internal''' are available via customizing code, but are used to log internal events. As it is not recommended to mix logging of internal events together with others, the two additional categories '''CUSTOMIZING''' and '''WORKFLOW''' have been created.
Line 31: Line 31:
 
|-
 
|-
 
|}
 
|}
 +
 +
== Switch off logging ==
 +
Turning off logging can be done by setting the '''switchValue''' in the Category Source to '''Off''' in the corresponding config files:
 +
* '''UBIK.Studio.exe.config''' for for {{UBIKSTUDIO}}
 +
* '''Web.config''' for {{UBIK}} Webservice
 +
 +
<source lang="xml">
 +
<loggingConfiguration name="" tracingEnabled="true" defaultCategory="ASSERTION">
 +
...
 +
<categorySources>
 +
<add switchValue="Off" name="ASSERTION">
 +
<listeners>
 +
<add name="log.assertion"/>
 +
</listeners>
 +
</add>
 +
...
 +
</source>
  
 
==See also==
 
==See also==

Revision as of 05:51, 4 June 2014

To document certain events (errors, warnings, etc.) that occur in the UBIK® system, a logging mechanism is provided to support the designer or programmer in finding issues in the design process or to identify the reason for problems at runtime. Logging in UBIK® can be configured for the Web Service as well as for the UBIKSTUDIO. The general configuration for logging is described here.

  • The logging in UBIK® Studio can be configured by editing the file UBIK.Studio.exe.config, which is located in the program folder of UBIK® Studio and also contains the section loggingConfiguration which can be configured in the same way like the UBIK® Web Service.

Logging Categories

UBIK® has different types of categories configured for the logging mechanism. The following categories can be configured in the configuration files. Categories with the remark internal are available via customizing code, but are used to log internal events. As it is not recommended to mix logging of internal events together with others, the two additional categories CUSTOMIZING and WORKFLOW have been created.

Type Description Access
CUSTOMIZING Log for events that occured in the customizing. This method is available by calling UBIKKernel.LogCustomizing(...) from the customizing code. public
WORKFLOW Log for events that occured when running workflows which is provided by the WriteLogEntry Activity public
ASSERTION Log for failed Assertions internal
WARNING Log for events that created a warning internal
ERROR Log for events that created an error internal
DEBUG Log for events that have to be investigated in the development internal
SQL Log for events related to SQL queries internal
EXCEPTION Log for events that caused an exception internal

Switch off logging

Turning off logging can be done by setting the switchValue in the Category Source to Off in the corresponding config files:

  • UBIK.Studio.exe.config for for UBIKSTUDIO
  • Web.config for UBIK® Webservice
<loggingConfiguration name="" tracingEnabled="true" defaultCategory="ASSERTION">
...
<categorySources>
<add switchValue="Off" name="ASSERTION">
<listeners>
<add name="log.assertion"/>
</listeners>
</add>
...

See also