Merge pull request #3558 from LnL7/ssh-ng-stderr

remote-store: don't log raw stderr by default
This commit is contained in:
Eelco Dolstra 2020-05-04 13:02:33 +02:00 committed by GitHub
commit 3ebfbecdd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View file

@ -779,8 +779,10 @@ std::exception_ptr RemoteStore::Connection::processStderr(Sink * sink, Source *
return std::make_exception_ptr(Error(status, error));
}
else if (msg == STDERR_NEXT)
printError(chomp(readString(from)));
else if (msg == STDERR_NEXT) {
string s = chomp(readString(from));
printMsg(lvlVomit, "stderr %s", s);
}
else if (msg == STDERR_START_ACTIVITY) {
auto act = readNum<ActivityId>(from);

View file

@ -63,6 +63,16 @@ public:
writeToStderr(prefix + filterANSIEscapes(fs.s, !tty) + "\n");
}
void result(ActivityId act, ResultType type, const std::vector<Field> & fields) override
{
if (type == resBuildLogLine || type == resPostBuildLogLine) {
assert(0 < fields.size());
assert(fields[0].type == Logger::Field::tString);
auto lastLine = fields[0].s;
log(lvlInfo, lastLine);
}
}
void startActivity(ActivityId act, Verbosity lvl, ActivityType type,
const std::string & s, const Fields & fields, ActivityId parent)
override