* Write build logs to disk again.
This commit is contained in:
parent
00aadf478b
commit
f5d5ffe536
|
@ -87,6 +87,11 @@ public:
|
||||||
|
|
||||||
virtual void waiteeDone(GoalPtr waitee, bool success);
|
virtual void waiteeDone(GoalPtr waitee, bool success);
|
||||||
|
|
||||||
|
virtual void writeLog(int fd, const unsigned char * buf, size_t count)
|
||||||
|
{
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
void trace(const format & f);
|
void trace(const format & f);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -395,6 +400,9 @@ private:
|
||||||
/* Delete the temporary directory, if we have one. */
|
/* Delete the temporary directory, if we have one. */
|
||||||
void deleteTmpDir(bool force);
|
void deleteTmpDir(bool force);
|
||||||
|
|
||||||
|
/* Callback used by the worker to write to the log. */
|
||||||
|
void writeLog(int fd, const unsigned char * buf, size_t count);
|
||||||
|
|
||||||
string name();
|
string name();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1183,6 +1191,14 @@ void NormalisationGoal::deleteTmpDir(bool force)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void NormalisationGoal::writeLog(int fd,
|
||||||
|
const unsigned char * buf, size_t count)
|
||||||
|
{
|
||||||
|
assert(fd == logPipe.readSide);
|
||||||
|
writeFull(fdLogFile, buf, count);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
string NormalisationGoal::name()
|
string NormalisationGoal::name()
|
||||||
{
|
{
|
||||||
return (format("normalisation of `%1%'") % nePath).str();
|
return (format("normalisation of `%1%'") % nePath).str();
|
||||||
|
@ -1407,6 +1423,9 @@ public:
|
||||||
void tryToRun();
|
void tryToRun();
|
||||||
void finished();
|
void finished();
|
||||||
|
|
||||||
|
/* Callback used by the worker to write to the log. */
|
||||||
|
void writeLog(int fd, const unsigned char * buf, size_t count);
|
||||||
|
|
||||||
string name();
|
string name();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1645,6 +1664,15 @@ void SubstitutionGoal::finished()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SubstitutionGoal::writeLog(int fd,
|
||||||
|
const unsigned char * buf, size_t count)
|
||||||
|
{
|
||||||
|
assert(fd == logPipe.readSide);
|
||||||
|
/* Don't write substitution output to a log file for now. We
|
||||||
|
probably should, though. */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
string SubstitutionGoal::name()
|
string SubstitutionGoal::name()
|
||||||
{
|
{
|
||||||
return (format("substitution of `%1%'") % storePath).str();
|
return (format("substitution of `%1%'") % storePath).str();
|
||||||
|
@ -1922,7 +1950,7 @@ void Worker::waitForInput()
|
||||||
} else {
|
} else {
|
||||||
printMsg(lvlVomit, format("%1%: read %2% bytes")
|
printMsg(lvlVomit, format("%1%: read %2% bytes")
|
||||||
% goal->name() % rd);
|
% goal->name() % rd);
|
||||||
// writeFull(goal.fdLogFile, buffer, rd); !!!
|
goal->writeLog(fd, buffer, (size_t) rd);
|
||||||
if (verbosity >= buildVerbosity)
|
if (verbosity >= buildVerbosity)
|
||||||
writeFull(STDERR_FILENO, buffer, rd);
|
writeFull(STDERR_FILENO, buffer, rd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue