remove unused extra json fields

This commit is contained in:
Ben Burdette 2020-05-12 12:09:12 -06:00
parent 2a19bf8619
commit 19cffc29c9
3 changed files with 0 additions and 34 deletions

View file

@ -1364,7 +1364,6 @@ void LocalStore::verifyPath(const Path & pathS, const StringSet & store,
auto state(_state.lock());
invalidatePath(*state, path);
} else {
// TODO log as warning if repair successful??
logError(
ErrorInfo {
.name = "Missing path with referrers",

View file

@ -780,15 +780,6 @@ std::exception_ptr RemoteStore::Connection::processStderr(Sink * sink, Source *
}
else if (msg == STDERR_NEXT)
// TODO: is this really an ErrorInfo error? Seems like we're forwarding the
// stderr output of the remote to current stderr/log
// ErrorInfo gets lost in this scenario.
// An alternative might be a logger on the remote that forwards ErrorInfo and etc.
// logError(
// ErrorInfo {
// // .name = "Remote Store" TODO reasonable name.
// .hint = hintfmt(chomp(readString(from)))
// });
printError(chomp(readString(from)));
else if (msg == STDERR_START_ACTIVITY) {

View file

@ -150,7 +150,6 @@ struct JSONLogger : Logger {
void logEI(const ErrorInfo & ei) override
{
// add fields like Pos info and etc?
std::ostringstream oss;
oss << ei;
@ -159,29 +158,6 @@ struct JSONLogger : Logger {
json["level"] = ei.level;
json["msg"] = oss.str();
// Extra things that COULD go into json. Useful?
// TODO: decide if useful.
// TODO: make a json obj that goes into json["msg"]?
json["name"] = ei.name;
json["description"] = ei.description;
if (ei.hint.has_value()) {
json["hint"] = ei.hint->str();
}
if (ei.nixCode.has_value()) {
if (ei.nixCode->errPos.line != 0)
json["line"] = ei.nixCode->errPos.line;
if (ei.nixCode->errPos.column != 0)
json["column"] = ei.nixCode->errPos.column;
if (ei.nixCode->errPos.file != "")
json["file"] = ei.nixCode->errPos.file;
if (ei.nixCode->prevLineOfCode.has_value())
json["prevLineOfCode"] = *ei.nixCode->prevLineOfCode;
if (ei.nixCode->errLineOfCode.has_value())
json["errLineOfCode"] = *ei.nixCode->errLineOfCode;
if (ei.nixCode->nextLineOfCode.has_value())
json["nextLineOfCode"] = *ei.nixCode->nextLineOfCode;
}
write(json);
}