<< Click to Display Table of Contents >> RayPack > 7.3 u6 > User Guide > Advanced Topics Advanced Logging Options |
Besides the product configuration options that are available from the Settings section of the application UI, there are some additional configuration settings users may adjust to tailor RayPack towards their individual requirements.
The program data directory (C:\Users\<username>\AppData\Roaming\RayPack\Logs) is used by default to store the application activity log file (yyyy-MM-dd HH-mm-ss.log). If the default settings remain unchanged, RayPack adds a new line to this log file for every system DEBUG level message that is generated during application use.
The log is by default to be used as in a rolling appender manner, which means that one global log file is permanently extended until a certain file size is reached. As soon as it is reached, the oldest lines are automatically transferred into an archive of log files, which is by default limited to 10 files. When this second limit is reached, the oldest archive is removed to free a slot for the newest archive file.
In order to change the default settings for the log file behavior, users have to manually edit the log4net.config file, which resides in the root of the installation folder of RayPack (usually something like C:\Program Files (x86)\RayPack\). The settings which are most likely to be of interest for adjustments are:
The log file is by default “C:\Users\<username>\AppData\Roaming\RayPack\Logs\dd-MM-yyyy-HH-mm-ss.log.log”. However, it is possible to define any other absolute local paths as well as shared network locations for logging resource storage.
<file type="log4net.Util.PatternString" value="%env{AppData}\\RayPack\\Logs\\%date{yyyy-MM-dd HH-mm-ss}.log" /> |
Be aware: The user that runs RayPack must have write permissions in the log file location in order to initiate and maintain the message flow to the log file. If the user does not have sufficient access rights, there will be no error message, or actual product usage cutback, but simply a loss of system activity documentation. Please refer to the Troubleshooting section for additional instructions in case of missing logs. |
The max. log file size may be defined as "KB", "MB" or "GB". The default setting for newly installed RayPack instances is "2048KB"
<maximumFileSize value="2048KB" /> |
The most frequently used log level settings are DEBUG, INFO, WARN, ERROR, FATAL, OFF, whilst OFF prevents logging at all, FATAL is the most restrictive but still writing setting, and DEBUG the most talkative option.
The recommendation is to use the DEBUG level for newly setup systems, since a lot of the information logged in this mode may help to adjust settings regarding access rights, and the like. As soon as the application and system are up and running productively, setting the log level to WARNING should be sufficient for permanent maintenance.
<level value="DEBUG" /> |
The default configuration file is given below as a review and backup support:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> </configSections>
<log4net> <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"> <layout type="log4net.Layout.PatternLayout"> <IgnoresException value="False" /> <conversionPattern value="[%-5p] - %m%n" /> </layout> <threshold value="INFO" /> </appender> <appender name="RayPackFileAppender" type="log4net.Appender.RollingFileAppender"> <immediateFlush value="true" /> <file type="log4net.Util.PatternString" value="%property{LogFilePath}\%date{yyyy-MM-dd-HH-mm-ss}.log" /> <param name="StaticLogFileName" value="false" /> <maximumFileSize value="10240KB" /> <rollingStyle value="Once" /> <maxSizeRollBackups value="2" /> <layout type="log4net.Layout.PatternLayout,log4net"> <param name="header" value="/***************************** LOG HEADER *****************************/
" /> <param name="footer" value="/***************************** LOG FOOTER *****************************/ " /> <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" /> </layout> <threshold value="INFO" /> <encoding value="utf-8" /> </appender> <root> <level value="INFO" /> <appender-ref ref="ConsoleAppender" /> <appender-ref ref="RayPackFileAppender" /> </root> </log4net> </configuration> |
RayPack uses an external library to provide logging functionality. Please refer to the online-documentation provided for the log4net project (http://logging.apache.org/log4net/) in order to get further details regarding available configuration and usage options. log4net can be adjusted to connect directly with databases or event-loggers. There are numerous options for layout and behavior manipulations. RayPack system administrators with a slight affection for perfection are highly welcome to configure their very own logger version.