log4net

Medium

Logging is useful for localization of application troubles. Creatio enables logging for all main operations.

The log4net solution is used for logging. This tool enables to perform logging of parameters from different components of the application into separate log files.

Logging is performed separately for the application loader and for the Default configuration. To set up logging, modify the ..\Terrasoft.WebApp\log4net.config configuration file.

Storing log data 

Attention. Location of the log files depends on the value of Windows system variables.

By default the loader log files are located by following path

[TEMP]\Creatio\Site_[{SiteId}]\[{ApplicationName}]\Log\[{DateTime.Today}]

Example

C:\Windows\Temp\Creatio\Site_1\Creatio\Log\2018_05_22

Files with the Default configuration logs are located by following path

[TEMP]\Creatio\Site_[{SiteId}]\[{ApplicationName}]\[ConfigurationNumber]\Log\[{DateTime.Today}]

Example

C:\Windows\Temp\Creatio\Site_1\Creatio\0\Log\2018_05_22

Variables specified in the square brackets:

  • TEMP – the base folder. By default the C:\Windows\Temp folder is used by IIS and the C:\Users\{User name}\AppData\Local\Temp folder used by Visual Studio (IIS Express).
  • {SiteId} – site number. For the IIS, the number is specified in the site advanced settings. For the Visual Studio the number is 2.
  • {ApplicationName} – application name.
  • ConfigurationNumber – configuration number. The number for the Default, configuration usually is 0.
  • {DateTime.Today} – logging date.
scr_IIS_advanced.png

Changing the logging level 

By default the logging level for all Creatio components is set to provide maximal performance for the application. Possible levels of logging in order of increasing priority:

  • ALL – logging of all events. Significantly reduces application performance.
  • DEBUG – logging all events at debugging.
  • INFO – logging of errors, warnings and messages.
  • WARN – logging of errors and warnings.
  • ERROR – logging of errors.
  • FATAL – logging only errors that lead to the termination of the component being logged.
  • OFF – logging disabled.
Change the logging level
Medium

Set the maximum level of logging for all components 

To do this, specify the ALL level in the <root> XML element of the .\Terrasoft.WebApp\log4net.config file.

<root>
    <level value="ALL" />
    <appender-ref ref="commonAppender" />
</root>

Set logging of errors when working with SVN 

To do this, specify the ERROR level in the <logger name="Svn"> XML element of the .\Terrasoft.WebApp\log4net.config file.

<logger name="Svn" >
    <level value="ERROR" />
    <appender-ref ref="SvnAppender" />
</logger>