| 61 | stream() << file << ":" << line << ": "; |
| 62 | } |
| 63 | void Flush() { |
| 64 | stream() << "\n"; |
| 65 | std::string s = str_.str(); |
| 66 | size_t n = s.size(); |
| 67 | if (fwrite(s.data(), 1, n, stderr) < n) {} // shut up gcc |
| 68 | flushed_ = true; |
| 69 | } |
| 70 | ~LogMessage() { |
| 71 | if (!flushed_) { |
| 72 | Flush(); |