Skip to content

Commit cd97fb1

Browse files
azarumbulldozer-bot[bot]
authored andcommitted
log conda output (apache#588)
## Upstream SPARK-XXXXX ticket and PR link (if not applicable, explain) When running verbose conda commands, outputs via `log.info` are not being logged, but outputs with `logInfo` are. We also want to log the conda command in the case the verbosity flag is on (>0). ## What changes were proposed in this pull request? Change the logging of the conda command to `logInfo` and log the command when the verbosity flag is on. ## How was this patch tested? N/A.
1 parent bf401d3 commit cd97fb1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

core/src/main/scala/org/apache/spark/api/conda/CondaEnvironmentManager.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,15 @@ final class CondaEnvironmentManager(condaBinaryPath: String,
177177
BasicIO.processFully((redactCredentials _).andThen(line => {
178178
out.append(line)
179179
out.append(BasicIO.Newline)
180+
if (verbosity > 0) {
181+
logInfo(s"<conda> $line")
182+
}
180183
()
181184
})),
182185
BasicIO.processFully((redactCredentials _).andThen(line => {
183186
err.append(line)
184187
err.append(BasicIO.Newline)
185-
log.info(s"<conda> $line")
188+
logInfo(s"<conda> $line")
186189
})))
187190
val exitCode = command.run(collectErrOutToBuffer).exitValue()
188191
if (exitCode != 0) {

0 commit comments

Comments
 (0)