KB Article #182375

SERVER LOGS: Redirecting messages about subscriptions still in progress to a flat file

Problem

In some specific cases customers have scheduled subscriptions that run very occasionally and they may get a warning that the subscription is still in progress and has gone into a retry cycle, as stated in KB 68553.


This may cause delays for the transfer flow and you may want to monitor a specific log file to get warned about all subscriptions that get such a warning so they are aware of the delay and take actions in time. This article will provide a guideline on how to add additional file appender in the tm-log4j.xml file to log to a flat file all messages about subscriptions still in progress.


Resolution

In all of the below examples, you must replace the $FILEDRIVEHOME placeholder with the full system path to ST's installation directory.


1. Backup the tm-log4j.xml file located under $FILEDRIVEHOME/conf.


2. Add the following appender in the Appenders section of the file:


<!--- Begin Appender redirecting messages about subscription still in progress to a flat file. -->
<File append="true" fileName="$FILEDRIVEHOME/var/logs/subscription-in-progress.log" name="SUBSINPROGRESSFILE">
    <RegexFilter onMatch="ACCEPT" onMismatch="DENY" regex=".*PARTNER-IN.*"/>
    <PatternLayout pattern="%d{HH:mm:ss}{GMT+0} %d{ISO8601} [%t] %p %c %equals{%x}{[]}{} - %m%n%ex"/>
</File>
<!--- End Appender redirecting messages about subscription still in progress to a flat file. -->


3. Add the following logger in the Loggers section of the file:


<!--- Logger for messages about subscription still in progress -->
<Logger additivity="false" level="INFO" name="com.tumbleweed.st.server.eventqueue.impl.EventQueueManagerBase">
    <AppenderRef ref="SUBSINPROGRESSFILE"/>
</Logger>


4. If you need to rotate the log file daily or based on file size (200MB in the example), you can replace the appender in point 2 with the following:


<!--- Begin Appender redirecting messages about subscription still in progress to a flat file. -->
<RollingFile append="true" fileName="$FILEDRIVEHOME/var/logs/subscription-in-progress.log" name="SUBSINPROGRESSFILE" filePattern="$FILEDRIVEHOME/var/db/hist/logs/%d{yyyy-MM-dd}-%i.subscription-in-progress.log.gz">
    <RegexFilter onMatch="ACCEPT" onMismatch="DENY" regex=".*PARTNER-IN.*"/>
    <PatternLayout pattern="%d{HH:mm:ss}{GMT+0} %d{ISO8601} [%t] %p %c %equals{%x}{[]}{} - %m%n%ex"/>
    <Policies>
        <!--- The TimeBasedTriggeringPolicy is based on the 
        filePattern used and the default time used would be the pattern defined:
         %d{yyyy-MM-dd}. This means, the log will rotate each day since the 
        finest time selected in the pattern is 'dd'. -->
        <TimeBasedTriggeringPolicy />

        <!--- If the file size exceeds 200MB before the file 
        gets rotated by the end of the day, it will get rotated due to the file 
        size exceeded. -->
        <SizeBasedTriggeringPolicy size="200 MB" />
    </Policies>
</RollingFile>
<!--- End Appender redirecting messages about subscription still in progress to a flat file. -->


5. Restart the SecureTransport services to apply the change. In case of a cluster environment, changes must be applied on all of the nodes and a restart of the services will be required for all of them.