| 103 | } |
| 104 | |
| 105 | void JsonEmitter::log(SinkMessage const& sm) { |
| 106 | json::Object entry; |
| 107 | entry["sec"] = sm.time / 1000000000; |
| 108 | entry["usec"] = sm.time % 1000000000; |
| 109 | entry["severity"] = sm.severity; |
| 110 | entry["section"] = sm.section; |
| 111 | entry["file"] = sm.file; |
| 112 | entry["func"] = sm.func; |
| 113 | entry["line"] = sm.line; |
| 114 | entry["message"] = sm.message; |
| 115 | agi::JsonWriter::Write(entry, *fp); |
| 116 | fp->flush(); |
| 117 | } |
| 118 | |
| 119 | } |