PICout refactoring, new SHSTKMacros

This commit is contained in:
2022-08-07 22:07:26 +03:00
parent 1eaecb288f
commit 8551499a5e
36 changed files with 106 additions and 106 deletions

View File

@@ -350,25 +350,25 @@ private:
//! \relatesalso PICout \brief Output operator PIBinaryLog::BinLogInfo to PICout
inline PICout operator <<(PICout s, const PIBinaryLog::BinLogInfo & bi) {
s.space();
s.setControl(0, true);
s.saveAndSetControls(0);
s << "[PIBinaryLog] " << bi.path << "\n";
if (bi.log_size < 0) {
s << "invalid file path";
s.restoreControl();
s.restoreControls();
return s;
}
if (bi.log_size == 0) {
s << "Invalid empty file";
s.restoreControl();
s.restoreControls();
return s;
} if (bi.records_count < 0 && bi.records_count > -4) {
s << "Invalid file or corrupted signature";
s.restoreControl();
s.restoreControls();
return s;
}
if (bi.records_count < -3) {
s << "Invalid binlog version";
s.restoreControl();
s.restoreControls();
return s;
}
s << "read records " << bi.records_count << " in " << bi.records.size() << " types, log size " << bi.log_size;
@@ -380,7 +380,7 @@ inline PICout operator <<(PICout s, const PIBinaryLog::BinLogInfo & bi) {
s << "\n record start " << bri.start_time << " , end " << bri.end_time;
s << "\n record size " << bri.minimum_size << " - " << bri.maximum_size;
}
s.restoreControl();
s.restoreControls();
return s;
}