2#include <NDEVR/Dictionary.h>
3#include <NDEVR/String.h>
5#include <NDEVR/BinaryFile.h>
14 class LogManager :
public InfoPipe
231 File m_default_ascii_log_path;
A LogStream that writes log messages directly to a specified ASCII text file.
Logic for reading or writing to a binary file including logic for compressing or decompressing the fi...
The equivelent of std::vector but with a bit more control.
A hash-based key-value store, useful for quick associative lookups.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
void removeInputGuard(uint04 idx) final override
Removes an input guard by index from all child logs.
virtual void addMessage(uint04 id, const LogMessage &) override
Adds a structured log message to all child logs.
bool cancelRequested() const final override
Checks whether any cancellation has been requested across all child logs.
virtual void requestCancel(uint04 idx) override
Requests cancellation of a specific operation by index across all child logs.
uint04 addInputGuard(const TranslatedString &name) final override
Adds a new input guard with the given name.
void addProgressSource(const TranslatedString &name, uint04 idx, fltp04 progress) final override
Registers a progress source at a specific index.
void addInput(const StringView &s, uint04 idx) final override
Adds user input text associated with a specific input guard index.
void writeToFile(BinaryFile &file, uint01 minimum_log_level, CompressionMode mode=CompressionMode::e_default_compression)
Writes all log messages at or above the given level to a binary file.
void addStream(LogStream *stream, bool add_all) override
Adds a log stream to this manager and optionally to all child logs.
bool cancelRequestedIdx(uint04 idx) const final override
Checks whether cancellation has been requested for a specific index.
void logStartupInformation(const StringView &log) const
Logs system startup information such as environment and version details.
void addCancelGuard(const TranslatedString &name, uint04 idx) final override
Adds a cancel guard at a specific index.
void clearInputIdx(uint04 idx) final override
Clears the stored input text for a specific input guard index.
virtual void addMessage(uint04 id, const TranslatedString &, uint01=10) override
Adds a translated string message to all child logs.
uint04 addCancelGuard(const TranslatedString &name) final override
Adds a new cancel guard with the given name.
void addInput(const StringView &s) final override
Adds user input text to the default input guard.
void readFromFile(BinaryFile &file, uint08 version_number)
Reads log data from a binary file.
InfoPipe * getLog(const StringView &log_name) const
Retrieves the log pipe associated with the given name.
MoveMode
Defines how existing log data is handled when changing log paths.
@ e_move
Move existing log data to the new location.
@ e_copy
Copy existing log data to the new location.
@ e_ignore
Discard existing log data when switching locations.
fltp04 progressIdx(uint04 idx) const final override
Gets the progress percentage for a specific progress source.
uint04 addProgressSource(const TranslatedString &name, fltp04 progress) final override
Registers a new progress source with the given name and initial progress.
void removeProgressSource(uint04 idx) final override
Removes a progress source by index from all child logs.
void setProgressIdx(uint04 idx, fltp04 percent) final override
Sets the progress percentage for a specific progress source across all child logs.
virtual void addMessage(uint04 id, const StringView &, uint01=10) override
Adds a raw string message to all child logs.
void getInputIdx(String &s, uint04 idx, bool clear) final override
Retrieves user input text for a specific input guard index.
const Dictionary< String, InfoPipe * > & logs()
Returns a reference to the dictionary of all registered logs.
void addLog(const StringView &name, InfoPipe *info)
Registers a named log pipe with this manager.
void removeStream(LogStream *stream) override
Removes a log stream from this manager and all child logs.
void setDefaultAsciiLogPath(const File &file, MoveMode mode)
Sets the default file path for ASCII log output, optionally moving or copying existing data.
bool hasLog(const StringView &log_name) const
Checks whether a log with the given name exists in this manager.
void requestCancel() override
Requests cancellation of all ongoing operations across all child logs.
virtual void addMessages(uint04 id, const Buffer< LogMessage > &) override
Adds multiple log messages to all child logs in a batch.
InfoPipe * defaultLog() const
Retrieves the default log pipe named "DEFAULT".
void removeCancelGuard(uint04 idx) final override
Removes a cancel guard by index from all child logs.
A class that allows for specific log information to be conveyed to a InfoPipe object including inform...
A listener that receives and processes log messages and progress updates from an InfoPipe.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
CompressionMode
Forward declaration of the Module struct for module metadata.
@ e_default_compression
Uses a sensible default compression strategy.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
@ file
The source file path associated with this object.
@ name
The display name of the object.