omarismail94 commented on a change in pull request #13701:
URL: https://github.com/apache/beam/pull/13701#discussion_r554141396
##########
File path:
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/DataflowWorkerLoggingInitializer.java
##########
@@ -167,10 +168,10 @@ public static synchronized void initialize() {
originalStdErr = System.err;
System.setOut(
JulHandlerPrintStreamAdapterFactory.create(
- loggingHandler, SYSTEM_OUT_LOG_NAME, Level.INFO));
+ loggingHandler, SYSTEM_OUT_LOG_NAME, Level.INFO,
StandardCharsets.UTF_8));
System.setErr(
JulHandlerPrintStreamAdapterFactory.create(
- loggingHandler, SYSTEM_ERR_LOG_NAME, Level.SEVERE));
+ loggingHandler, SYSTEM_ERR_LOG_NAME, Level.SEVERE,
StandardCharsets.UTF_8));
Review comment:
@TheNeuralBit Fixed! And I left UTF_8 in the test case, which I think
is correct.
Even though the `checkstyleMain.enabled` flag in the `build.gradle` file for
the worker project is set to false, I added `ForbidDefaultCharset` to
`SuppressWarning`. If `checkstyleMain.enabled` is set to true, the test should
still pass. I set the flag to true and I didn't see the warning. I also removed
the suppression exception and the checkstyle was triggered for
`defaultCharset()`
##########
File path:
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/DataflowWorkerLoggingInitializer.java
##########
@@ -167,10 +168,10 @@ public static synchronized void initialize() {
originalStdErr = System.err;
System.setOut(
JulHandlerPrintStreamAdapterFactory.create(
- loggingHandler, SYSTEM_OUT_LOG_NAME, Level.INFO));
+ loggingHandler, SYSTEM_OUT_LOG_NAME, Level.INFO,
StandardCharsets.UTF_8));
System.setErr(
JulHandlerPrintStreamAdapterFactory.create(
- loggingHandler, SYSTEM_ERR_LOG_NAME, Level.SEVERE));
+ loggingHandler, SYSTEM_ERR_LOG_NAME, Level.SEVERE,
StandardCharsets.UTF_8));
Review comment:
No problem -enjoy your weekend!
----------------------------------------------------------------
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]