forked from lix-project/lix
logging: handle build log lines in simple logger
The raw stderr output isn't logged anymore so the build logs need to be printed by the default logger in order for the old commands like nix-build to still show build output.
This commit is contained in:
parent
f16e24f95e
commit
4769eea5e2
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue