record.h 569 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include "priority.h"
  3. #include <util/generic/string.h>
  4. #include <util/generic/vector.h>
  5. #include <util/system/defaults.h>
  6. #include <utility>
  7. struct TLogRecord {
  8. using TMetaFlags = TVector<std::pair<TString, TString>>;
  9. const char* Data;
  10. size_t Len;
  11. ELogPriority Priority;
  12. TMetaFlags MetaFlags;
  13. inline TLogRecord(ELogPriority priority, const char* data, size_t len, TMetaFlags metaFlags = {}) noexcept
  14. : Data(data)
  15. , Len(len)
  16. , Priority(priority)
  17. , MetaFlags(std::move(metaFlags))
  18. {
  19. }
  20. };