1. Delete your old log4j.properties and log4j-session.properties files to avoid confusion.
2. Create a new file named log4j-console.properties in a local directory (e.g., ./flink-config).
3. Copy the corrected configuration I provided above into that new file.
4. Modify your docker-compose.yml to remove the FLINK_PROPERTIES_JAVA_OPTS variable.
5. Add the volume mount (- ./flink-config/log4j-console.properties:/opt/flink/conf/log4j-console.properties) to both your jobmanager and taskmanager services.
6. Restart your containers with docker-compose down && docker-compose up.
Your LOG.debug messages from the com.snmp package should now appear on the console (docker logs ...) and also in the flink-snmp-connector.log file inside the container’s /opt/flink/log directory. Rest of logs should behave as expected. (edited)