CppLogging  1.0.4.0
C++ Logging Library
ostream_appender.cpp
Go to the documentation of this file.
1 
10 
11 namespace CppLogging {
12 
14 {
15  // Skip logging records without layout
16  if (record.raw.empty())
17  return;
18 
19  // Append logging record content
20  _ostream.write((char*)record.raw.data(), record.raw.size() - 1);
21 }
22 
24 {
25  // Flush stream
26  _ostream.flush();
27 }
28 
29 } // namespace CppLogging
void AppendRecord(Record &record) override
Append the given logging record.
void Flush() override
Flush the logging appender.
Logging record.
Definition: record.h:37
std::vector< uint8_t > raw
Record content after layout.
Definition: record.h:53
C++ Logging project definitions.
Definition: appender.h:15
Output stream (std::ostream) appender definition.