You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/12/03 15:45:53 UTC

[GitHub] [flink] zentol opened a new pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

zentol opened a new pull request #14304:
URL: https://github.com/apache/flink/pull/14304


   General:
   - adjust project names based on phrasing on their repsective homepage
   - add links for all mentioned frameworks
   - add introduction for what logging is about
   - rename "command line client" to "command line interface"
   
   Log4j:
   - omit some details about JVM options being set automatically
   - list missing log4j-console.properties file
   
   Logback:
   - sync logback structure with log4j sections
   - add explicit instructions on which jars should be removed/added
   - remove logback.xml configuration example
   - add note about logback 1.3+ not being supported
   
   Slf4j:
   - extend the example to a runnable application
   - add note that the logger should be 'private static final'
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] V1ncentzzZ commented on a change in pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
V1ncentzzZ commented on a change in pull request #14304:
URL: https://github.com/apache/flink/pull/14304#discussion_r538300524



##########
File path: docs/deployment/advanced/logging.md
##########
@@ -59,49 +71,47 @@ For Flink distributions this means you have to
 
 ## Configuring logback
 
-For users and developers alike it is important to control the logging framework.
-The configuration of the logging framework is exclusively done by configuration files.
-The configuration file either has to be specified by setting the environment property `-Dlogback.configurationFile=<file>` or by putting `logback.xml` in the classpath.
-The `conf` directory contains a `logback.xml` file which can be modified and is used if Flink is started outside of an IDE and with the provided starting scripts.
-The provided `logback.xml` has the following form:
-
-{% highlight xml %}
-<configuration>
-    <appender name="file" class="ch.qos.logback.core.FileAppender">
-        <file>${log.file}</file>
-        <append>false</append>
-        <encoder>
-            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{60} %X{sourceThread} - %msg%n</pattern>
-        </encoder>
-    </appender>
-
-    <root level="INFO">
-        <appender-ref ref="file"/>
-    </root>
-</configuration>
-{% endhighlight %}
+To use Flink with [logback](https://logback.qos.ch/) you must ensure that:
+- `org.apache.logging.log4j:log4j-slf4j-impl` is not on the classpath,
+- `ch.qos.logback:logback-core` and `ch.qos.logback:logback-classic` are on the classpath.
 
-In order to control the logging level of `org.apache.flink.runtime.jobgraph.JobGraph`, for example, one would have to add the following line to the configuration file.
+In the IDE this means you have to replace such dependencies defined in your pom, and possibly add exclusions on dependencies that transitively depend on them.
 
-{% highlight xml %}
-<logger name="org.apache.flink.runtime.jobgraph.JobGraph" level="DEBUG"/>
-{% endhighlight %}
+For Flink distributions this means you have to
+- remove the `log4j-slf4j-impl` jar from the `lib` directory,
+- add the `logback-core`, and `logback-classic` jars to the `lib` directory.
+
+The Flink distribution ships with the following logback configuration files in the `conf` directory, which are used automatically if logback is enabled:
+- `logback-session.properties`: used by the command line interface when starting a Kubernetes/Yarn session cluster (i.e., `kubernetes-session.sh`/`yarn-session.sh`)
+- `logback-console.properties`: used for Job-/TaskManagers if they are run in the foreground (e.g., Kubernetes)
+- `logback.xml`: used for command line interface and Job-/TaskManagers by default
 
-For further information on configuring logback see [LOGback's manual](http://logback.qos.ch/manual/configuration.html).
+<div class="alert alert-info" markdown="span">
+  <strong>Note:</strong> Logback 1.3+ requires SLF4J 2, which is currently not supported.
+</div>
 
 ## Best practices for developers
 
-The loggers using slf4j are created by calling
+You can create an SLF4J logger by calling `org.slf4j.LoggerFactory#LoggerFactory.getLogger` with the `Class` of your class as an argument.
+
+We highly recommend storing this logger in a `private static final` field.
 
 {% highlight java %}
 import org.slf4j.LoggerFactory
 import org.slf4j.Logger

Review comment:
       I think we can add a semicolon at the end and it's the best to change the import order according to checkstyle.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol merged pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
zentol merged pull request #14304:
URL: https://github.com/apache/flink/pull/14304


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14304:
URL: https://github.com/apache/flink/pull/14304#issuecomment-738113012


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10499",
       "triggerID" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f9221a2432825b663273f3e1f17a46d9f10c5161",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10635",
       "triggerID" : "f9221a2432825b663273f3e1f17a46d9f10c5161",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa48a945c6d276f7efe987e8e79441b8740ae1b2 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10499) 
   * f9221a2432825b663273f3e1f17a46d9f10c5161 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10635) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] tillrohrmann commented on a change in pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
tillrohrmann commented on a change in pull request #14304:
URL: https://github.com/apache/flink/pull/14304#discussion_r537543179



##########
File path: docs/deployment/advanced/logging.md
##########
@@ -23,30 +23,39 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-The logging in Flink is implemented using the slf4j logging interface. As underlying logging framework, log4j2 is used. We also provide logback configuration files and pass them to the JVM's as properties. Users willing to use logback instead of log4j2 can just exclude log4j2 (or delete it from the lib/ folder).
+All Flink processes create a log text file that contains messages for various events happening in that process.
+These logs provide deep insights into the inner workings of Flink, and can be used to detect problems (in the form of WARN/ERROR messages) and can help in debugging them.
+
+The log files can be accessed via the Job-/TaskManager pages of the WebUI. The used [Resource Provider]({% link deployment/resource-providers/index.md %}) (e.g., YARN) may provide additional means of accessing them.
+
+The logging in Flink uses the [SLF4J](http://www.slf4j.org/) logging interface.
+This allows you to use any logging framework that supports SLF4J, without having to modify the Flink source code.
+
+By default, [Log4j 2](https://logging.apache.org/log4j/2.x/index.html) is used as the underlying logging framework.
 
 * This will be replaced by the TOC
 {:toc}
 
-## Configuring Log4j2
+## Configuring Log4j 2
 
-Log4j2 is controlled using property files. In Flink's case, the file is usually called `log4j.properties`. We pass the filename and location of this file using the `-Dlog4j.configurationFile=` parameter to the JVM.
+Log4j 2 is controlled using property files.

Review comment:
       Maybe state that the default log4j 2 configuration has set the monitorInterval to 30.

##########
File path: docs/deployment/advanced/logging.md
##########
@@ -23,30 +23,39 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-The logging in Flink is implemented using the slf4j logging interface. As underlying logging framework, log4j2 is used. We also provide logback configuration files and pass them to the JVM's as properties. Users willing to use logback instead of log4j2 can just exclude log4j2 (or delete it from the lib/ folder).
+All Flink processes create a log text file that contains messages for various events happening in that process.
+These logs provide deep insights into the inner workings of Flink, and can be used to detect problems (in the form of WARN/ERROR messages) and can help in debugging them.
+
+The log files can be accessed via the Job-/TaskManager pages of the WebUI. The used [Resource Provider]({% link deployment/resource-providers/index.md %}) (e.g., YARN) may provide additional means of accessing them.
+
+The logging in Flink uses the [SLF4J](http://www.slf4j.org/) logging interface.
+This allows you to use any logging framework that supports SLF4J, without having to modify the Flink source code.
+
+By default, [Log4j 2](https://logging.apache.org/log4j/2.x/index.html) is used as the underlying logging framework.
 
 * This will be replaced by the TOC
 {:toc}
 
-## Configuring Log4j2
+## Configuring Log4j 2
 
-Log4j2 is controlled using property files. In Flink's case, the file is usually called `log4j.properties`. We pass the filename and location of this file using the `-Dlog4j.configurationFile=` parameter to the JVM.
+Log4j 2 is controlled using property files.
 
-Flink ships with the following default properties files:
+The Flink distribution ships with the following log4j properties files in the `conf` directory, which are used automatically if log4j 2 is enabled:
 
-- `log4j-cli.properties`: Used by the Flink command line client (e.g. `flink run`) (not code executed on the cluster)
-- `log4j-session.properties`: Used by the Flink command line client when starting a YARN or Kubernetes session (`yarn-session.sh`, `kubernetes-session.sh`)
-- `log4j.properties`: JobManager/Taskmanager logs (both standalone and YARN)
+- `log4j-cli.properties`: used by the command line interface (e.g., `flink run`)
+- `log4j-session.properties`: used by the command line interface when starting a Kubernetes/Yarn session cluster (i.e., `kubernetes-session.sh`/`yarn-session.sh`)
+- `log4j-console.properties`: used for Job-/TaskManagers if they are run in the foreground (e.g., Kubernetes)
+- `log4j.properties`: used for Job-/TaskManagers by default
 
-### Compatibility with Log4j1
+### Compatibility with Log4j 1
 
 Flink ships with the [Log4j API bridge](https://logging.apache.org/log4j/log4j-2.2/log4j-1.2-api/index.html), allowing existing applications that work against Log4j1 classes to continue working.
 
-If you have custom Log4j1 properties files or code that relies on Log4j1, please check out the official Log4j [compatibility](https://logging.apache.org/log4j/2.x/manual/compatibility.html) and [migration](https://logging.apache.org/log4j/2.x/manual/migration.html) guides.
+If you have custom Log4j 1 properties files or code that relies on Log4j 1, please check out the official Log4j [compatibility](https://logging.apache.org/log4j/2.x/manual/compatibility.html) and [migration](https://logging.apache.org/log4j/2.x/manual/migration.html) guides.
 
 ## Configuring Log4j1
 
-To use Flink with Log4j1 you must ensure that:
+To use Flink with [Log4j 1](https://logging.apache.org/log4j/1.2/) you must ensure that:
 - `org.apache.logging.log4j:log4j-core`, `org.apache.logging.log4j:log4j-slf4j-impl` and `org.apache.logging.log4j:log4j-1.2-api` are not on the classpath,
 - `log4j:log4j`, `org.slf4j:slf4j-log4j12`, `org.apache.logging.log4j:log4j-to-slf4j` and `org.apache.logging.log4j:log4j-api` are on the classpath.

Review comment:
       Isn't `log4j:log4j` the same as `org.apache.logging.log4j:log4j-core`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #14304:
URL: https://github.com/apache/flink/pull/14304#discussion_r537571667



##########
File path: docs/deployment/advanced/logging.md
##########
@@ -23,30 +23,39 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-The logging in Flink is implemented using the slf4j logging interface. As underlying logging framework, log4j2 is used. We also provide logback configuration files and pass them to the JVM's as properties. Users willing to use logback instead of log4j2 can just exclude log4j2 (or delete it from the lib/ folder).
+All Flink processes create a log text file that contains messages for various events happening in that process.
+These logs provide deep insights into the inner workings of Flink, and can be used to detect problems (in the form of WARN/ERROR messages) and can help in debugging them.
+
+The log files can be accessed via the Job-/TaskManager pages of the WebUI. The used [Resource Provider]({% link deployment/resource-providers/index.md %}) (e.g., YARN) may provide additional means of accessing them.
+
+The logging in Flink uses the [SLF4J](http://www.slf4j.org/) logging interface.
+This allows you to use any logging framework that supports SLF4J, without having to modify the Flink source code.
+
+By default, [Log4j 2](https://logging.apache.org/log4j/2.x/index.html) is used as the underlying logging framework.
 
 * This will be replaced by the TOC
 {:toc}
 
-## Configuring Log4j2
+## Configuring Log4j 2
 
-Log4j2 is controlled using property files. In Flink's case, the file is usually called `log4j.properties`. We pass the filename and location of this file using the `-Dlog4j.configurationFile=` parameter to the JVM.
+Log4j 2 is controlled using property files.
 
-Flink ships with the following default properties files:
+The Flink distribution ships with the following log4j properties files in the `conf` directory, which are used automatically if log4j 2 is enabled:
 
-- `log4j-cli.properties`: Used by the Flink command line client (e.g. `flink run`) (not code executed on the cluster)
-- `log4j-session.properties`: Used by the Flink command line client when starting a YARN or Kubernetes session (`yarn-session.sh`, `kubernetes-session.sh`)
-- `log4j.properties`: JobManager/Taskmanager logs (both standalone and YARN)
+- `log4j-cli.properties`: used by the command line interface (e.g., `flink run`)
+- `log4j-session.properties`: used by the command line interface when starting a Kubernetes/Yarn session cluster (i.e., `kubernetes-session.sh`/`yarn-session.sh`)
+- `log4j-console.properties`: used for Job-/TaskManagers if they are run in the foreground (e.g., Kubernetes)
+- `log4j.properties`: used for Job-/TaskManagers by default
 
-### Compatibility with Log4j1
+### Compatibility with Log4j 1
 
 Flink ships with the [Log4j API bridge](https://logging.apache.org/log4j/log4j-2.2/log4j-1.2-api/index.html), allowing existing applications that work against Log4j1 classes to continue working.
 
-If you have custom Log4j1 properties files or code that relies on Log4j1, please check out the official Log4j [compatibility](https://logging.apache.org/log4j/2.x/manual/compatibility.html) and [migration](https://logging.apache.org/log4j/2.x/manual/migration.html) guides.
+If you have custom Log4j 1 properties files or code that relies on Log4j 1, please check out the official Log4j [compatibility](https://logging.apache.org/log4j/2.x/manual/compatibility.html) and [migration](https://logging.apache.org/log4j/2.x/manual/migration.html) guides.
 
 ## Configuring Log4j1
 
-To use Flink with Log4j1 you must ensure that:
+To use Flink with [Log4j 1](https://logging.apache.org/log4j/1.2/) you must ensure that:
 - `org.apache.logging.log4j:log4j-core`, `org.apache.logging.log4j:log4j-slf4j-impl` and `org.apache.logging.log4j:log4j-1.2-api` are not on the classpath,
 - `log4j:log4j`, `org.slf4j:slf4j-log4j12`, `org.apache.logging.log4j:log4j-to-slf4j` and `org.apache.logging.log4j:log4j-api` are on the classpath.

Review comment:
       In case you are wondering why org.apache.logging.log4j:log4j-api is also required for log4j1: This is because some dependencies directly work against log4j2 (iirc kinesis or elasticsearch), and will fail with CNFEs if the API is not accessible.
   I don't quite remember whether the affected classes would be able to log anything though.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #14304:
URL: https://github.com/apache/flink/pull/14304#discussion_r537569181



##########
File path: docs/deployment/advanced/logging.md
##########
@@ -23,30 +23,39 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-The logging in Flink is implemented using the slf4j logging interface. As underlying logging framework, log4j2 is used. We also provide logback configuration files and pass them to the JVM's as properties. Users willing to use logback instead of log4j2 can just exclude log4j2 (or delete it from the lib/ folder).
+All Flink processes create a log text file that contains messages for various events happening in that process.
+These logs provide deep insights into the inner workings of Flink, and can be used to detect problems (in the form of WARN/ERROR messages) and can help in debugging them.
+
+The log files can be accessed via the Job-/TaskManager pages of the WebUI. The used [Resource Provider]({% link deployment/resource-providers/index.md %}) (e.g., YARN) may provide additional means of accessing them.
+
+The logging in Flink uses the [SLF4J](http://www.slf4j.org/) logging interface.
+This allows you to use any logging framework that supports SLF4J, without having to modify the Flink source code.
+
+By default, [Log4j 2](https://logging.apache.org/log4j/2.x/index.html) is used as the underlying logging framework.
 
 * This will be replaced by the TOC
 {:toc}
 
-## Configuring Log4j2
+## Configuring Log4j 2
 
-Log4j2 is controlled using property files. In Flink's case, the file is usually called `log4j.properties`. We pass the filename and location of this file using the `-Dlog4j.configurationFile=` parameter to the JVM.
+Log4j 2 is controlled using property files.
 
-Flink ships with the following default properties files:
+The Flink distribution ships with the following log4j properties files in the `conf` directory, which are used automatically if log4j 2 is enabled:
 
-- `log4j-cli.properties`: Used by the Flink command line client (e.g. `flink run`) (not code executed on the cluster)
-- `log4j-session.properties`: Used by the Flink command line client when starting a YARN or Kubernetes session (`yarn-session.sh`, `kubernetes-session.sh`)
-- `log4j.properties`: JobManager/Taskmanager logs (both standalone and YARN)
+- `log4j-cli.properties`: used by the command line interface (e.g., `flink run`)
+- `log4j-session.properties`: used by the command line interface when starting a Kubernetes/Yarn session cluster (i.e., `kubernetes-session.sh`/`yarn-session.sh`)
+- `log4j-console.properties`: used for Job-/TaskManagers if they are run in the foreground (e.g., Kubernetes)
+- `log4j.properties`: used for Job-/TaskManagers by default
 
-### Compatibility with Log4j1
+### Compatibility with Log4j 1
 
 Flink ships with the [Log4j API bridge](https://logging.apache.org/log4j/log4j-2.2/log4j-1.2-api/index.html), allowing existing applications that work against Log4j1 classes to continue working.
 
-If you have custom Log4j1 properties files or code that relies on Log4j1, please check out the official Log4j [compatibility](https://logging.apache.org/log4j/2.x/manual/compatibility.html) and [migration](https://logging.apache.org/log4j/2.x/manual/migration.html) guides.
+If you have custom Log4j 1 properties files or code that relies on Log4j 1, please check out the official Log4j [compatibility](https://logging.apache.org/log4j/2.x/manual/compatibility.html) and [migration](https://logging.apache.org/log4j/2.x/manual/migration.html) guides.
 
 ## Configuring Log4j1
 
-To use Flink with Log4j1 you must ensure that:
+To use Flink with [Log4j 1](https://logging.apache.org/log4j/1.2/) you must ensure that:
 - `org.apache.logging.log4j:log4j-core`, `org.apache.logging.log4j:log4j-slf4j-impl` and `org.apache.logging.log4j:log4j-1.2-api` are not on the classpath,
 - `log4j:log4j`, `org.slf4j:slf4j-log4j12`, `org.apache.logging.log4j:log4j-to-slf4j` and `org.apache.logging.log4j:log4j-api` are on the classpath.

Review comment:
       no.
   Semantically, log4j:log4j is equivalent to the union of org.apache.logging.log4j:log4j-core and org.apache.logging.log4j:log4j-api .
   The packages for all classes are also different (org.apache.log4j vs org.apache.logging.log4j)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14304:
URL: https://github.com/apache/flink/pull/14304#issuecomment-738113012


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10499",
       "triggerID" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa48a945c6d276f7efe987e8e79441b8740ae1b2 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10499) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14304:
URL: https://github.com/apache/flink/pull/14304#issuecomment-738113012


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10499",
       "triggerID" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f9221a2432825b663273f3e1f17a46d9f10c5161",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10635",
       "triggerID" : "f9221a2432825b663273f3e1f17a46d9f10c5161",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f9221a2432825b663273f3e1f17a46d9f10c5161 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10635) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14304:
URL: https://github.com/apache/flink/pull/14304#issuecomment-738113012


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10499",
       "triggerID" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f9221a2432825b663273f3e1f17a46d9f10c5161",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f9221a2432825b663273f3e1f17a46d9f10c5161",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa48a945c6d276f7efe987e8e79441b8740ae1b2 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10499) 
   * f9221a2432825b663273f3e1f17a46d9f10c5161 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14304:
URL: https://github.com/apache/flink/pull/14304#issuecomment-738113012


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa48a945c6d276f7efe987e8e79441b8740ae1b2 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14304:
URL: https://github.com/apache/flink/pull/14304#issuecomment-738113012


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10499",
       "triggerID" : "aa48a945c6d276f7efe987e8e79441b8740ae1b2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa48a945c6d276f7efe987e8e79441b8740ae1b2 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=10499) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #14304:
URL: https://github.com/apache/flink/pull/14304#discussion_r538540769



##########
File path: docs/deployment/advanced/logging.md
##########
@@ -59,49 +71,47 @@ For Flink distributions this means you have to
 
 ## Configuring logback
 
-For users and developers alike it is important to control the logging framework.
-The configuration of the logging framework is exclusively done by configuration files.
-The configuration file either has to be specified by setting the environment property `-Dlogback.configurationFile=<file>` or by putting `logback.xml` in the classpath.
-The `conf` directory contains a `logback.xml` file which can be modified and is used if Flink is started outside of an IDE and with the provided starting scripts.
-The provided `logback.xml` has the following form:
-
-{% highlight xml %}
-<configuration>
-    <appender name="file" class="ch.qos.logback.core.FileAppender">
-        <file>${log.file}</file>
-        <append>false</append>
-        <encoder>
-            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{60} %X{sourceThread} - %msg%n</pattern>
-        </encoder>
-    </appender>
-
-    <root level="INFO">
-        <appender-ref ref="file"/>
-    </root>
-</configuration>
-{% endhighlight %}
+To use Flink with [logback](https://logback.qos.ch/) you must ensure that:
+- `org.apache.logging.log4j:log4j-slf4j-impl` is not on the classpath,
+- `ch.qos.logback:logback-core` and `ch.qos.logback:logback-classic` are on the classpath.
 
-In order to control the logging level of `org.apache.flink.runtime.jobgraph.JobGraph`, for example, one would have to add the following line to the configuration file.
+In the IDE this means you have to replace such dependencies defined in your pom, and possibly add exclusions on dependencies that transitively depend on them.
 
-{% highlight xml %}
-<logger name="org.apache.flink.runtime.jobgraph.JobGraph" level="DEBUG"/>
-{% endhighlight %}
+For Flink distributions this means you have to
+- remove the `log4j-slf4j-impl` jar from the `lib` directory,
+- add the `logback-core`, and `logback-classic` jars to the `lib` directory.
+
+The Flink distribution ships with the following logback configuration files in the `conf` directory, which are used automatically if logback is enabled:
+- `logback-session.properties`: used by the command line interface when starting a Kubernetes/Yarn session cluster (i.e., `kubernetes-session.sh`/`yarn-session.sh`)
+- `logback-console.properties`: used for Job-/TaskManagers if they are run in the foreground (e.g., Kubernetes)
+- `logback.xml`: used for command line interface and Job-/TaskManagers by default
 
-For further information on configuring logback see [LOGback's manual](http://logback.qos.ch/manual/configuration.html).
+<div class="alert alert-info" markdown="span">
+  <strong>Note:</strong> Logback 1.3+ requires SLF4J 2, which is currently not supported.
+</div>
 
 ## Best practices for developers
 
-The loggers using slf4j are created by calling
+You can create an SLF4J logger by calling `org.slf4j.LoggerFactory#LoggerFactory.getLogger` with the `Class` of your class as an argument.
+
+We highly recommend storing this logger in a `private static final` field.
 
 {% highlight java %}
 import org.slf4j.LoggerFactory
 import org.slf4j.Logger

Review comment:
       good idea




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #14304: [FLINK-20353][docs][logging] Update logging documentation

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14304:
URL: https://github.com/apache/flink/pull/14304#issuecomment-738092109


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit aa48a945c6d276f7efe987e8e79441b8740ae1b2 (Thu Dec 03 15:48:38 UTC 2020)
   
   **Warnings:**
    * Documentation files were touched, but no `.zh.md` files: Update Chinese documentation or file Jira ticket.
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org