title: flink logging to file for user code not working
body: <p>I'm new to Flink, so this question could be quite simple...</p>
  
  <p>Flink version is 1.5.0.</p>
  
  <p>I created a sample project, copy SocketWindowWordCount from Flink sample code.</p>
  
  <p>My pom.xml file is copy from official site: <a href="https://ci.apache.org/projects/flink/flink-docs-release-1.5/start/dependencies.html" rel="nofollow noreferrer">here</a></p>
  
  <p>I just add some smiple log.info(...) statements. 
  No matter I add a log4j.properties in project resources folder, or modify log4j-cli.properties in flink conf folder. The log I added won't output to log file.</p>
  
  <p>log4j-cli.properties modification:</p>
  
  <pre><code>log4j.logger.test.flink=INFO, file, console
  </code></pre>
  
  <p>After add this line in log4j-cli.properties, I can see logs in console, but still not appear in both jobmanager.log and taskmanager.log.</p>
  
  <p>I'm using flink run to submit:</p>
  
  <pre><code>flink run -m yarn-cluster -yn=2 test.jar
  </code></pre>
  
  <p>Appreciate any help. Thanks.</p>