RSC200111: Logging Options for RaySuite Products

Besides the product configuration options that are available in the Settings section of the UI of the different Raynet applications, there are some additional configuration settings that users can adjust to tailor RaySuite products towards their individual requirements.

Logging the applications activity

The program data directory ,as defined in the table below, is used by default to store the application activity log file. If the default settings remain unchanged, the RaySuite application adds a new line to this log file for every system DEBUG level message that is generated during application use.

By default, the log is 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, by default, is limited to 10 files. When this second limit is reached, the oldest archive is removed to free a slot for the newest archive file.

  Path to logfile log file name Installation folder .config file name
RayQC C:\Users\<Username>\AppData\Roaming\Raynet\RayQC\Logs RayQC.log  C:\Program Files (x86)\RayPackStudio\RayQC log4net.config
RayQC Advanced C:\Users\<Username>\AppData\Roaming\RayQC Ad\Logs dd-MM-yyyy-HH-mm-ss.log  C:\Program Files (x86)\RayPackStudio\RayQC log.config
RayEval C:\Users\<Username>\AppData\Roaming\RayEval\Logs dd-MM-yyyy-HH-mm-ss.log  C:\Program Files (x86)\RayPackStudio\RayEval log.config
RayPack C:\Users\<Username>\AppData\Roaming\RayPack\Logs dd-MM-yyyy-HH-mm-ss.log  C:\Program Files (x86)\RayPackStudio\RayPack RayPack.exe.config
PackBench C:\Users\<Username>\AppData\Roaming\RayBench\Logs dd-MM-yyyy-HH-mm-ss.log  C:\Program Files (x86)\RayPackStudio\PackBench log.config
RayFlow Client C:\Users\<Username>\AppData\Roaming\Raynet\RayFlow\Logs Rayflow.log  C:\Program Files (x86)\RayFlowClient log4net.config

The exact path to the log file and the installation folder of the current RaySuite application instance can also be found in the 'TROUBLESHOOTING' tab which is located in the 'ABOUT' section of most of the RaySuite applications.

Example:

Logging_Options.PNG

In order to change the default settings for the log file behavior, users have to manually edit the .config (the exact name of the file depends on the application and can be found in the table below), which resides in the root of the installation folder of the RaySuite application (usually something like C:\Program Files (x86)\[APPLICATIONNAME]\). The settings which are most likely to be of interest for adjustments are:

Log file storage location

The log file is by default “%appdata%\Raynet\[APPLICATIONNAME]\Logs\[APPLICATIONNAME].log” or “%appdata%\[APPLICATIONNAME]\Logs\{yyyy-MM-dd HH-mm-ss}.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}\\Raynet\\[APPLICATIONNAME]\\Logs\\[APPLICATIONNAME].log" />

or

<file type="log4net.Util.PatternString"

        value="%env{AppData}\\[APPLICATIONNAME]\\Logs\\%date{yyyy-MM-dd HH-mm-ss}.log" />

Please keep in mind, that the user that runs the RaySuite application 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.

Max. log file size

The max. log file size may be defined as "KB", "MB" or "GB". The default setting for newly installed RaySuite application instances is "2048KB"

<maximumFileSize value="2048KB" />

Log level

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" />

Default logging configuration of all RaySuite products

The default configuration files are given below as a review and backup support.

RayQC:

<?xml version="1.0" encoding="utf-8" ?>

<log4net>

 

  <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">

    <file type="log4net.Util.PatternString"

        value="%env{AppData}\\RayQC\\Logs\\%date{yyyy-MM-dd HH-mm-ss}.log" />

   

    <rollingStyle value="Once" />

    <maxSizeRollBackups value="2" />

    <maximumFileSize value="10240KB" />

    <staticLogFileName value="false" />

    <layout type="log4net.Layout.PatternLayout">

      <conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />

    </layout>

  </appender>

 

  <root>

    <level value="DEBUG" />

    <appender-ref ref="RollingFileAppender" />

  </root>

 

</log4net>

RayQC Advanced:

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

 

  <configSections>

    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>

  </configSections>

 

  <log4net>

   

    <appender name="RayQCAdvanced" type="log4net.Appender.RollingFileAppender">

      <immediateFlush value="true" />

      <file type="log4net.Util.PatternString" value="%property{LogFilePath}\%date{dd-MM-yyyy-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 *****************************/&#xD;&#xA;"/>

        <param name="footer" value="/***************************** LOG FOOTER *****************************/&#xD;&#xA;"/>

        <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />

      </layout>

      <threshold value="INFO" />

    </appender>

   

    <root>

      <level value="ALL" />

      <appender-ref ref="RayQCAdvanced" />

    </root>

   

  </log4net>

</configuration>

RayPack:

<log4net>

     <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">

      <layout type="log4net.Layout.PatternLayout">

        <IgnoresException value="False" />

        <conversionPattern value="[%-5p] - %m%n" />

      </layout>

      <threshold value="Warn" />

    </appender>

   

    <appender name="RayPackFileAppender" type="log4net.Appender.RollingFileAppender">

      <immediateFlush value="true" />

      <file type="log4net.Util.PatternString" value="%property{LogFilePath}\%date{dd-MM-yyyy-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 *****************************/&#xD;&#xA;" />

        <param name="footer" value="/***************************** LOG FOOTER *****************************/&#xD;&#xA;" />

        <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />

      </layout>

      <threshold value="INFO" />

    </appender>

 

    <appender name="CaptureFileAppender" type="log4net.Appender.RollingFileAppender">

      <immediateFlush value="true" />

      <lockingModel type="raypack.msi.Common.Utils.LockDeleteEmpty" />

      <file type="log4net.Util.PatternString" value="%property{PathToLog}\%property{LogFileName}" />

      <param name="StaticLogFileName" value="false" />

      <maximumFileSize value="10240KB" />

      <rollingStyle value="Once" />

      <maxSizeRollBackups value="2" />

      <layout type="log4net.Layout.PatternLayout,log4net">

        <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />

      </layout>

     

      <threshold value="INFO" />

 

      <filter type="log4net.Filter.LoggerMatchFilter">

        <loggerToMatch value="raypack.msi.BusinessLayer.Snapshots.Snapshots.SnapshotManager" />

      </filter>

      <filter type="log4net.Filter.LoggerMatchFilter">

        <loggerToMatch value="raypack.msi.BusinessLayer.Snapshots.SnapshotMaker" />

      </filter>

      <filter type="log4net.Filter.LoggerMatchFilter">

        <loggerToMatch value="raypack.msi.BusinessLayer.Snapshots.ExternalTools.SnapshotTools.RpMakeToolMonitor" />

      </filter>

      <filter type="log4net.Filter.LoggerMatchFilter">

        <loggerToMatch value="raypack.msi.BusinessLayer.Snapshots.Snapshots.Filtering.FilterManager" />

      </filter>

      <filter type="log4net.Filter.LoggerMatchFilter">

        <loggerToMatch value="raypack.msi.WPF.BAL.MsiMaker" />

      </filter>

      <filter type="log4net.Filter.LoggerMatchFilter">

        <loggerToMatch value="raypack.msi.WPF.BAL.MstMaker" />

      </filter>

      <filter type="log4net.Filter.LoggerMatchFilter">

        <loggerToMatch value="raypack.msi.BusinessLayer.Tables" />

      </filter>

      <filter type="log4net.Filter.LoggerMatchFilter">

        <loggerToMatch value="raypack.msi.BusinessLayer.Utils.CABHelper" />

      </filter>

      <filter type="log4net.Filter.LoggerMatchFilter">

        <loggerToMatch value="raypack.msi.BusinessLayer.MsmPool" />

      </filter>

      <filter type="log4net.Filter.DenyAllFilter" />

     

    </appender>

   

    <root>

      <level value="INFO" />

      <appender-ref ref="ConsoleAppender" />

      <appender-ref ref="RayPackFileAppender" />

      <appender-ref ref="CaptureFileAppender" />

    </root>

  </log4net>

RayFlow Client:

 

  <log4net>

    <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">

      <file type="log4net.Util.PatternString" value="%property{LogDirectory}\Rayflow.log" />

      <appendToFile value="true" />

      <rollingStyle value="Size" />

      <maxSizeRollBackups value="10" />

      <maximumFileSize value="10MB" />

      <staticLogFileName value="true" />

 

      <layout type="log4net.Layout.PatternLayout">

        <conversionPattern value="%-5p %d %5rms %-22.22c{1} %-18.18M - %m%n" />

      </layout>

    </appender>

 

    <root>

      <level value="DEBUG" />

      <appender-ref ref="RollingFile" />

    </root>

  </log4net>

RayEval:

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

 

    <configSections>

        <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>

    </configSections>

 

    <log4net>

 

        <appender name="RayEval" type="log4net.Appender.RollingFileAppender">

            <immediateFlush value="true" />

            <file type="log4net.Util.PatternString" value="%property{LogFilePath}\%date{dd-MM-yyyy-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 *****************************/&#xD;&#xA;"/>

                <param name="footer" value="/***************************** LOG FOOTER *****************************/&#xD;&#xA;"/>

                <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />

            </layout>

            <threshold value="INFO" />

        </appender>

 

        <root>

            <level value="ALL" />

            <appender-ref ref="RayEval" />

        </root>

 

    </log4net>

</configuration>

PackBench:

<?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">

        <conversionPattern value="[%-5p] - %m%n" />

      </layout>

      <threshold value="Info" />

    </appender>

 

    <appender name="RayBenchFileAppender" type="log4net.Appender.RollingFileAppender">

      <immediateFlush value="true" />

      <file type="log4net.Util.PatternString" value="%property{LogFilePath}\%date{dd-MM-yyyy-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 *****************************/&#xD;&#xA;" />

        <param name="footer" value="/***************************** LOG FOOTER *****************************/&#xD;&#xA;" />

        <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />

      </layout>

      <threshold value="INFO" />

    </appender>

 

    <root>

      <level value="INFO" />

      <appender-ref ref="ConsoleAppender" />

      <appender-ref ref="RayBenchFileAppender" />

    </root>

  </log4net>

</configuration>

Further Information

RaySuite applications use 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. RaySuite application system administrators with a slight affection for perfection are highly welcome to configure their very own logger version.

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk