fix #185 Redirect commands stdout/stderr to releaser.commands logger
This allows configuration of that specific logger to append only to eg. a File instead of polluting the main application log.
This commit is contained in:
committed by
Marcin Grzejszczak
parent
eb723b9157
commit
ea76d81630
@@ -325,8 +325,12 @@ class ReleaserProcessExecutor {
|
||||
log.info("Will run the command [{}]", Arrays.toString(commandsToRun));
|
||||
return new ProcessExecutor().command(commandsToRun).destroyOnExit()
|
||||
.readOutput(true)
|
||||
.redirectOutputAlsoTo(
|
||||
Slf4jStream.of(ReleaserProcessExecutor.class).asInfo())
|
||||
// releaser.commands logger should be configured to redirect
|
||||
// only to a file (with additivity=false). ideally the root logger should
|
||||
// append to same file on top of whatever root appender, so that file
|
||||
// contains the most output
|
||||
.redirectOutputAlsoTo(Slf4jStream.of("releaser.commands").asInfo())
|
||||
.redirectErrorAlsoTo(Slf4jStream.of("releaser.commands").asWarn())
|
||||
.directory(new File(workingDir));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user