Redirecting messages out of catalina.out
search cancel

Redirecting messages out of catalina.out

book

Article ID: 428204

calendar_today

Updated On:

Products

Network Observability Spectrum

Issue/Introduction

Is it in some way possible to redirect some messages from catalina.out to another log file ?

Environment

any supported Spectrum release

Cause

Example.

Catalina.out filled with the following logs:

2026-02-05 12:42:53,265 [pool-26-thread-1] INFO  com.aprisma.debuglog -  (SDNIntegrationServlet) - SpectrumInventoryUpdater - handleReceivedUpdate Processing Update for Site ID :- 12222222222, Site NAME :- XXXXXXX and update : PARTIAL
2026-02-05 12:42:53,295 [pool-21-thread-3] INFO  com.aprisma.debuglog -  (SDNIntegrationServlet) - SDNModeling - SDN Modeling started (LANDSCAPE ID=0x2100000, userDomainId=12222222222) .... at Thu Feb 05 12:42:53 CET 2026

Resolution

Here are the steps to configure the redirection:

  1. Backup the Configuration File 

  2. Edit log4j2.xml Open the file in a text editor.

  3. Add a New Appender Add a new RollingFile appender definition inside the <Appenders> section. This defines the new SDNIntegration.out file.

    <RollingFile name="SDNLOG" fileName="${logDir}/SDNIntegration.out" filePattern="${logDir}/SDNIntegration.%d{yyyy-MM-dd}.log.gz">
        <PatternLayout pattern="%d{dd/MM/yy HH:mm:ss:SSS z} [%t] %-5p %c{2} - %m%n"/>
        <Policies>
            <TimeBasedTriggeringPolicy />
            <SizeBasedTriggeringPolicy size="10 MB"/>
        </Policies>
        <DefaultRolloverStrategy max="10"/>
    </RollingFile>
    
  4. Configure the Logger Add a new <Logger> definition for com.aprisma.debuglog in the <Loggers> section. This configuration uses a RegexFilter to direct messages containing "SDNIntegrationServlet" to the new SDNLOG appender and deny them from the standard CATALINA appender (which feeds catalina.out).

    Note: Ensure you verify the name of your main appender. In most default Spectrum log4j2.xml files, the main appender is named CATALINA.

    <Logger name="com.aprisma.debuglog" level="INFO" additivity="false">
        <AppenderRef ref="SDNLOG">
            <RegexFilter regex=".*SDNIntegrationServlet.*" onMatch="ACCEPT" onMismatch="DENY"/>
        </AppenderRef>
    
        <AppenderRef ref="CATALINA">
            <RegexFilter regex=".*SDNIntegrationServlet.*" onMatch="DENY" onMismatch="NEUTRAL"/>
        </AppenderRef>
    </Logger>
    
  5. Restart Tomcat Restart the OneClick Tomcat service for the changes to take effect.