Enable same logging for console and log file

Hi,
I am using openfire on kubernetes cluster by creating a docker image. I want to print same logs in console which are getting printed in the openfire.log file but even after making below changes in log42j.xml file no detail logs are getting printed on console.

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

<Configuration monitorInterval="30">
    <Appenders>
        <!-- Modifying this appender is likely to break the log viewer that is part of the Openfire admin console.
           - If you'd like to have a differently formatted log file, it is advisable to create a new log file, by
           - duplicating this configuration, instead of changing it.
          -->
        <RollingFile name="openfire" fileName="${sys:openfireHome}/logs/openfire.log" filePattern="${sys:openfireHome}/logs/openfire.log-%i">
            <PatternLayout>
                <Pattern>%d{yyyy.MM.dd HH:mm:ss.SSS} %highlight{%-5p} [%t]: %c - %msg{nolookups}%n</Pattern>
            </PatternLayout>
            <Policies>
                <SizeBasedTriggeringPolicy size="100 MB"/>
            </Policies>
        </RollingFile>

        <Console name="console" target="SYSTEM_OUT">
            <PatternLayout pattern="%d{yyyy.MM.dd HH:mm:ss.SSS} %highlight{%-5p} [%t]: %c - %msg{nolookups}%n"/>
        </Console>
        
    </Appenders>

    <Loggers>
        <!-- OF-1095: Uniform output of loading/unloading of plugins to std-out. -->
        <Logger name="org.jivesoftware.openfire.container.PluginManager">
            <AppenderRef ref="console"/>
        </Logger>
        <Logger name="org.jivesoftware.openfire.container.PluginMonitor">
            <AppenderRef ref="console"/>
        </Logger>

        <!-- OF-506: Jetty INFO messages are generally not useful. Ignore them by default. -->
        <Logger name="org.eclipse.jetty" level="warn"/>

        <Root level="info">
            <AppenderRef ref="console"/>
            <AppenderRef ref="openfire"/>
        </Root>
    </Loggers>
</Configuration>

@guus could you please look into it and provide some help ?

I’m not immediately seeing a problem with this file. Please refer to the documentation of the logging framework (and/or your Kubernetes setup).

The syntax of this file is defined by the Log4j2 project. It’s documentation can be found on: Configuration file :: Apache Log4j

i got it resolved, i was making changes in the src file, it should have been copied in the target during assembly but since there is another file with same name in the target already it is not getting copied in the assembly process.