Skip to main content
Kofax

Filtering the Log file

3022562

Question / Problem: 

Sometimes the logger is full of messages that are not interesting for the problem or task you try to achieve. In that case it would be good to filter out all unwanted messages from the logger, so the real interesting information can be found more easily. In the following is explained how to filter out specific logger information. 

Answer / Solution: 

To filter information from the logger, you will need to change the client log and/or the server log file. See below the location where you would normally find the files to change:

Server:

C:\inetpub\wwwroot\Tis Web Site\eFlow_6\Bin\ConfigSources\TISLogger.config

Client:

C:\Program Files (x86)\tis\eFlow 6\Bin\ConfigSources\TISLogger.config

See below an example of the file content, added with 6 common eFLOW error messages, which can be filtered out from the logger, without any harm done. If other error messages should be filtered out, you can copy one of the "<filter type="log4net.Filter.StringMatchFilter">" sections and use the <stringToMatch value="XXX" />, where XXX should be replaced by a text that is not changing in the error message, you want to filter. 

<?xml version="1.0"?>
    <configuration>
        <configSections>
            <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false"/>
        </configSections>
        <log4net requirePermission="false">
            <root>
                <level value="ALL" />
                <appender-ref ref="EventLogAppender" />
            </root>
            <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender">
                <param name="LogName" value="TIS_Log" />
                <param name="ApplicationName" value="TIS_SERVER" />
                <layout type="log4net.Layout.PatternLayout">
                    <conversionPattern value="%date [%thread] %-5level Source App: %appdomain, Message: %message%newline" />
                </layout>
                <filter type="log4net.Filter.StringMatchFilter">

<stringToMatch value="Bad PE image" />

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

</filter><!-- Happens when Recognize starts -->

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

<stringToMatch value="DoesLineItemCalculationHold" />

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

</filter><!-- Extract - amount with extra characters passed into validation -->

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

<stringToMatch value="Failed to update done work counter" />

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

</filter><!-- Core-related - happens e.g. when collection is put on hold in Control -->

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

<stringToMatch value="TaskDeleteCollections.PerformImpl" />

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

</filter><!-- Control - this error happens from time to time -->

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

<stringToMatch value="TiS.Applications.Controller.TaskRefreshWorkflow"/>

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

</filter><!-- Control - this error happens from time to time -->

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

<stringToMatch value="No page data availble" />

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

</filter><!-- Classification - happens probably when no class is found -->
<filter type="log4net.Filter.LevelRangeFilter">
    <acceptOnMatch value="true" />
    <levelMin value="ERROR" />
    <levelMax value="FATAL" />
</filter>

</appender>

</log4net>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
</configuration>

Applies to:  

Product Version
eFLOW 5.x
eFLOW 6.x

 

 

  • Was this article helpful?