11#ifndef __BE_IO_FILELOGSHEET_H__
12#define __BE_IO_FILELOGSHEET_H__
62 const std::string &url,
63 const std::string &description);
87 const std::string &url);
109 std::vector<std::shared_ptr<FileLogsheet>>
144 bool allEntries =
false,
162 const std::string &entry);
166 void write(
const std::string &entry);
A class to represent a single logging mechanism with a file as the backing store.
static const int32_t BE_FILELOGSHEET_SEQ_START
Sequence from beginning.
FileLogsheet & operator=(const FileLogsheet &)
Prevent copying of FileLogsheet objects.
void write(const std::string &entry)
Write a string as an entry to the backing store.
void updateCursor()
Update the cursor position of the sequence file.
FileLogsheet(const std::string &url, const std::string &description)
Create a new log sheet.
FileLogsheet(const FileLogsheet &)
Prevent copying of FileLogsheet objects.
std::streamoff _cursor
Position of the sequencer, relative to SOF.
~FileLogsheet()
Destructor.
static const int32_t BE_FILELOGSHEET_SEQ_NEXT
Sequence from current position.
void writeDebug(const std::string &entry)
Write a string as a debug entry to the backing store.
void writeComment(const std::string &entry)
Write a string as a comment to the backing store.
void sync()
Synchronize any buffered data to the underlying backing store.
std::string sequence(bool allEntries=false, bool trim=true, int32_t cursor=BE_FILELOGSHEET_SEQ_NEXT)
Sequence through a FileLogsheet, returning one entry per invocation.
std::shared_ptr< std::fstream > _sequenceFile
Stream used for sequencing.
static void mergeLogsheets(std::vector< std::shared_ptr< FileLogsheet > > &logsheets)
Merge multiple FileLogsheets into a single FileLogsheet.
static std::string trim(const std::string &entry)
Trim delimiters from FileLogsheet entries.
std::unique_ptr< std::fstream > _theLogFile
Stream used for writing the log file.
FileLogsheet(const std::string &url)
Open an existing log sheet for appending.
A class to represent a logging mechanism.
This software was developed at the National Institute of Standards and Technology (NIST) by employees...