ark::awlog::AwlogWriter
Defined in header “ark/awlog/awlog_writer.hh”.
This class allows you to write out an ‘awlog’. It follows similar semantics as the standard log writer, but is more limited, writing only to a single file and omitting some metadata.
This is typically intended to be used as a container format for consumption by the webviz log tools.
Methods
-
AwlogWriter(AwlogWriterConfig config)
Constructor. Initializes the log writer with the given configuration. -
~AwlogWriter()
Destructor. Automatically invoked close() if you haven’t already done so. -
void close()
Closes the log writer, ensuring everything is written out to disk. No further changes can be made to the log. This function may throw if there was an error closing the log, but you cannot call close() again (ie, to retry), regardless. This function is final.Calling flush() before this is a good way to ensure that everything is “safe” to call close(), as if flush() fails, you can retry.
-
void write(const std::string & channel_name, const std::chrono::steady_clock::time_point & indexed_time, const core::ByteBuffer & data)
Writes the given byte buffer out to the log, assuming it came from the specified channel (by name).