[ 
https://issues.apache.org/jira/browse/FLINK-37919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dheeraj Panangat closed FLINK-37919.
------------------------------------
    Resolution: Not A Bug

Found the bug : 
1. Had to remove the log4j-* jars from Image
2. The cx-logger I had was not a fat jar, hence was missing dependencies
3. Instead of configurationListener/contextListner moved to TurboFilter, as the 
contextListner was throwing ConcurrentModificationException.

Closing the ticket

> Logback Configuration | Not applied correctly for JMs and TMs
> -------------------------------------------------------------
>
>                 Key: FLINK-37919
>                 URL: https://issues.apache.org/jira/browse/FLINK-37919
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Configuration
>    Affects Versions: 1.20.1
>            Reporter: Dheeraj Panangat
>            Priority: Major
>
> Below is the logback-console.xml being set in Flink :
> {code:java}
> <configuration debug="true" scan="true" scanPeriod="30 seconds">
>     <statusListener 
> class="ch.qos.logback.core.status.OnConsoleStatusListener"/>
>     <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
>         <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
>             <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level 
> %logger{36} - %msg%n</pattern>
>         </encoder>
>     </appender>
>     <logger name="io.company" level="INFO" additivity="false">
>         <appender-ref ref="CONSOLE"/>
>     </logger>
>     <logger name="com.company" level="INFO" additivity="false">
>         <appender-ref ref="CONSOLE"/>
>     </logger>
>     <root level="WARN">
>         <appender-ref ref="CONSOLE" />
>     </root>
> </configuration> {code}
> From within a package {{com.company.processor.DummyClass.class}}  I am 
> logging 2 statements,
> 1 with log.error() and other with log.info()
> Expecting both to be printed, but only see the ERROR log being printed.
> I have verified that the logback-console.xml is updated inside JM and TMs by 
> exec -it into the pods.
> The dummy class
> {code:java}
> package com.company.processor;
> import org.slf4j.Logger;
> import org.slf4j.LoggerFactory;
> public class DummyClass extends ProcessFunction<String, String> {
>  static final Logger log = LoggerFactory.getLogger(DummyClass.class);
>  //---inside processElement method : 
>  log.info("Accepted Data INFO: " + value);
>  log.error("Accepted Data ERROR:: {}", value);
> } {code}
> Communication on Flink channel : 
> [#troubleshooting|https://apache-flink.slack.com/archives/C03G7LJTS2G/p1746771450447989?thread_ts=1746709950.589169&cid=C03G7LJTS2G]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to