in runAs-agent/src/main/java/jetbrains/buildServer/runAs/agent/RunAsLoggerImpl.java [35:57]
public void LogRunAs(
@NotNull final UserCredentials userCredentials,
@NotNull final CommandLineSetup baseCommandLineSetup,
@NotNull final CommandLineSetup runAsCommandLineSetup) {
mySecuredLoggingService.disableLoggingOfCommandLine();
final GeneralCommandLine baseCmd = convertToCommandLine(baseCommandLineSetup, false);
final GeneralCommandLine runAsCmd = convertToCommandLine(runAsCommandLineSetup, true);
LOG.info("Run as user \"" + userCredentials.getUser() + "\": " + runAsCmd.getCommandLineString());
if(Boolean.parseBoolean(myRunnerParametersService.tryGetConfigParameter(RUN_AS_LOG_ENABLED))) {
myLoggerService.onStandardOutput("Starting: " + runAsCmd.getCommandLineString());
myLoggerService.onStandardOutput("as user: " + userCredentials.getUser());
}
myLoggerService.onStandardOutput("Starting: " + baseCmd.getCommandLineString());
File workingDirectory = runAsCommandLineSetup.getWorkingDirectory();
if(workingDirectory == null) {
workingDirectory = myPathsService.getPath(WellKnownPaths.Checkout);
}
myLoggerService.onStandardOutput("in directory: " + workingDirectory);
}