.NET Error: Logging
The error logging module is designed to log information and error messages to a file, so that error causes may be analyzed for rather complicated processes, such as the process to build a component that can be hosted with the CIMPLICITY environment.
The logging process is controlled by a logging configuration file named GEIP.Orion.ComponentsLogger.config in the ..\<CIMPLICITY Installation>\exe folder.
GEIP.Orion.ComponentsLogger.config has the following typical content:
<?xml version="1.0" encoding="utf-8" ?>
<log4net debug="true">
????<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
????????<file value=".\\DotNet Components\\ComponentsLogger.log" />
????????<appendToFile value="true" />
????????<rollingStyle value="Size" />
????????<maxSizeRollBackups value="10" />
????????<maximumFileSize value="10MB" />
????????<staticLogFileName value="true" />
????????<layout type="log4net.Layout.PatternLayout">
????????????<conversionPattern value="%d [%t] %-5p %logger %method%n%m%n" />
????????</layout>
????</appender>
????<root>
????????<level value="WARN" />
????????<appender-ref ref="RollingLogFileAppender" />
????</root>
</log4net>
- Items may be easily changed are the:
- Logging file path.
- Logging level.
- The content above sets the path to ..\<CIMPLICITY Installation>\exe\DotNet Components\ComponentsLogger.log.
- Levels include:
|
Logs everything |
|
Log successively fewer messages |
Refer to the log4net document for more details.
- The logging actions are mostly performed at the configuration mode and have no significant performance panelties even if the logging level is set to DEBUG.