11#ifndef __BE_IO_LOGSHEET_H__
12#define __BE_IO_LOGSHEET_H__
106 const std::string &url);
217 const std::string &entry);
237 const std::string &entry);
389 const std::string &entry);
411 std::stringbuf _sbuf{};
414 uint32_t _entryNumber{};
426 bool _commentCommit{};
A class to represent a logging mechanism.
static const char DebugDelimiter
Delimiter for an debug line in the log sheet.
void newEntry()
Start a new entry, causing the existing entry to be closed and written.
bool getCommit() const
Get the current entry commit state.
virtual void write(const std::string &entry)
Write a string as an entry to the backing store.
virtual void sync()
Synchronize any buffered data to the underlying backing store.
virtual ~Logsheet()
Destructor.
static bool lineIsDebug(const std::string &line)
Helper function to determine whether a string is a valid debug log entry.
void setCommit(const bool state)
Enable or disable the commitment of normal entries to the backing log storage.
virtual void writeDebug(const std::string &entry)
Write a string as a debug entry to the backing store.
static std::string trim(const std::string &entry)
Trim delimiters from Logsheet entries.
void setDebugCommit(const bool state)
Enable or disable the commitment of debug entries to the backing log storage.
Logsheet()
Create a Logsheet that has no backing store.
static bool lineIsEntry(const std::string &line)
Helper function to determine whether a string is a valid log entry.
static bool lineIsComment(const std::string &line)
Helper function to determine whether a string is a valid comment log entry.
std::string getCurrentEntryNumberAsString() const
Obtain the current entry 'tag', in 'Edddd' format.
bool getCommentCommit() const
Get the current comment entry commit state.
static const std::string SYSLOGURLSCHEME
The URL scheme to be used for SysLogsheet URL strings.
void setAutoSync(bool state)
Turn on/off auto-sync of the data.
uint32_t getCurrentEntryNumber() const
Obtain the current entry number.
void setCommentCommit(const bool state)
Enable or disable the commitment of comment entries to the backing log storage.
static const char CommentDelimiter
Delimiter for a comment line in the log sheet.
static const std::string DescriptionTag
The tag for the description string.
static const std::string FILEURLSCHEME
The URL scheme to be used for FileLogsheet URL strings.
bool getDebugCommit() const
Get the current debug entry commit state.
static const char EntryDelimiter
Delimiter for an entry line in the log sheet.
void incrementEntryNumber()
Increment the current entry number.
bool getAutoSync() const
Return the current auto-sync state.
static Logsheet::Kind getTypeFromURL(const std::string &url)
Map the URL scheme, taken from a string containing the entire URL, into a Logsheet type.
virtual void writeComment(const std::string &entry)
Write a string as a comment to the backing store.
std::string getCurrentEntry() const
Obtain the contents of the current entry currently under construction.
void resetCurrentEntry()
Reset the current entry buffer to the beginning.
This software was developed at the National Institute of Standards and Technology (NIST) by employees...