You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content.zh/docs/deployment/advanced/logging.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,18 @@ Flink adds the following fields to [MDC](https://www.slf4j.org/api/org/slf4j/MDC
50
50
51
51
This is most useful in environments with structured logging and allows you to quickly filter the relevant logs.
52
52
53
-
The MDC is propagated by slf4j to the logging backend which usually adds it to the log records automatically (e.g. in [log4j json layout](https://logging.apache.org/log4j/2.x/manual/json-template-layout.html)).
53
+
The MDC is propagated by slf4j to the logging backend which usually adds it to the log records automatically (e.g. in [log4j2 json layout](https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-template-resolver-mdc).
54
+
55
+
#### Log4j 2 JsonTemplateLayout
56
+
57
+
> JsonTemplateLayout is a customizable, efficient, and garbage-free JSON generating layout. It encodes LogEvents according to the structure described by the JSON template provided.
58
+
59
+
The required jar `log4j-layout-template-json` is bundled in the flink-dist for convenience.
60
+
61
+
For example templates, see the [Event Templates](https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-templates).
62
+
63
+
#### Log4j 2 PatternLayout
64
+
54
65
Alternatively, it can be configured explicitly - [log4j pattern layout](https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html) might look like this:
Copy file name to clipboardExpand all lines: docs/content/docs/deployment/advanced/logging.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,18 @@ Flink adds the following fields to [MDC](https://www.slf4j.org/api/org/slf4j/MDC
48
48
49
49
This is most useful in environments with structured logging and allows you to quickly filter the relevant logs.
50
50
51
-
The MDC is propagated by slf4j to the logging backend which usually adds it to the log records automatically (e.g. in [log4j json layout](https://logging.apache.org/log4j/2.x/manual/json-template-layout.html)).
51
+
The MDC is propagated by slf4j to the logging backend which usually adds it to the log records automatically (e.g. in [log4j2 json layout](https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-template-resolver-mdc).
52
+
53
+
#### Log4j 2 JsonTemplateLayout
54
+
55
+
> JsonTemplateLayout is a customizable, efficient, and garbage-free JSON generating layout. It encodes LogEvents according to the structure described by the JSON template provided.
56
+
57
+
The required jar `log4j-layout-template-json` is bundled in the flink-dist for convenience.
58
+
59
+
For example templates, see the [Event Templates](https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-templates).
60
+
61
+
#### Log4j 2 PatternLayout
62
+
52
63
Alternatively, it can be configured explicitly - [log4j pattern layout](https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html) might look like this:
0 commit comments