Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/14201#discussion_r71015468
--- Diff:
launcher/src/main/java/org/apache/spark/launcher/SparkLauncher.java ---
@@ -418,9 +511,16 @@ public SparkAppHandle
startApplication(SparkAppHandle.Listener... listeners) thr
}
}
- String loggerPrefix = getClass().getPackage().getName();
- String loggerName = String.format("%s.app.%s", loggerPrefix, appName);
- ProcessBuilder pb = createBuilder().redirectErrorStream(true);
+ String loggerName =
builder.getEffectiveConfig().get(CHILD_PROCESS_LOGGER_NAME);
+ ProcessBuilder pb = createBuilder();
+ // Only setup stderr + stdout to logger redirection if user has not
otherwise configured output
+ // redirection.
+ if (!redirectErrorStream && !redirectToLog && errorStream == null &&
outputStream == null) {
+ String loggerPrefix = getClass().getPackage().getName();
+ loggerName = String.format("%s.app.%s", loggerPrefix, appName);
--- End diff --
You can move the code that computes `appName` inside this condition.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]