diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-05-12 12:09:12 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-05-12 12:09:12 -0600 |
commit | 19cffc29c995af8fb155f2764664f0b079879b4f (patch) | |
tree | 010deb5487988a8f047f6f4438f1a5d39adfdc53 /src/libutil | |
parent | 2a19bf86197083e17d9b35596c21e3c1b3f4a170 (diff) |
remove unused extra json fields
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/logging.cc | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc index 7c75456ee..736ce604e 100644 --- a/src/libutil/logging.cc +++ b/src/libutil/logging.cc @@ -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); } |