YngwieWang commented on a change in pull request #8350: 
[FLINK-12403][doc-zh]Translate 'How to use logging' page into Chinese
URL: https://github.com/apache/flink/pull/8350#discussion_r310376731
 
 

 ##########
 File path: docs/monitoring/logging.zh.md
 ##########
 @@ -23,28 +23,25 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-The logging in Flink is implemented using the slf4j logging interface. As 
underlying logging framework, log4j is used. We also provide logback 
configuration files and pass them to the JVM's as properties. Users willing to 
use logback instead of log4j can just exclude log4j (or delete it from the lib/ 
folder).
+Flink 的日志记录是通过 slf4j 日志接口实现的。默认使用 log4j 作为日志框架,同时也提供 logback 配置文件并以属性形式传给 
JVM。开发者如果想使用 logback 来代替 log4j 的话,只需要从依赖里排除或目录里删掉 log4j。
 
 * This will be replaced by the TOC
 {:toc}
 
-## Configuring Log4j
+## Log4j 配置
 
-Log4j 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.configuration=` parameter to the JVM.
+Log4j 是通过属性文件来配置的,在 Flink 中这个文件叫 `log4j.properties`。我们可以将文件名和文件路径通过 
`-Dlog4j.configuration=` 传给JVM。 
 
-Flink ships with the following default properties files:
+Flink 默认会使用下面的 properties 文件:
 
-- `log4j-cli.properties`: Used by the Flink command line client (e.g. `flink 
run`) (not code executed on the cluster)
-- `log4j-yarn-session.properties`: Used by the Flink command line client when 
starting a YARN session (`yarn-session.sh`)
-- `log4j.properties`: JobManager/Taskmanager logs (both standalone and YARN)
+- `log4j-cli.properties`: 在 Flink 命令行客户端中使用,比如 `flink run`,(在非集群环境下执行)
+- `log4j-yarn-session.properties`: 在 Flink 命令行客户端开启 YARN session  
(`yarn-session.sh`) 时使用
+- `log4j.properties`: 在 JobManager 和 Taskmanager 日志记录时使用,包括 standalone 和 YARN 
环境
 
-## Configuring logback
+## 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:
+对用户和开发者来说掌控日志框架非常重要,最好是仅通过配置文件就能完成日志框架的配置。配置文件既可以通过设置环境变量 
`-Dlogback.configurationFile=<file>` 来指定,又可以通过添加 `logback.xml` 来指定。`conf` 目录里的 
`logback.xml` 文件是可以修改的,如果 Flink 是在 IDE 之外通过附带的 shell 脚本启动的话,会使用这个配置文件。
 
 Review comment:
   ```suggestion
   对用户和开发者来说掌控日志框架非常重要。
   日志框架的配置完全由配置文件完成。
   配置文件既可以通过设置环境变量 `-Dlogback.configurationFile=<file>` 来指定,又可以通过将 
`logback.xml` 添加到 classpath 来指定。
   `conf` 目录里的 `logback.xml` 文件是可以修改的,如果 Flink 是在 IDE 之外通过附带的 shell 
脚本启动的话,会使用这个配置文件。
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to