![]() |
NDEVR
API Documentation
|
A class that has any number of children that also feed into the log. More...
Public Types | |
| enum | MoveMode { e_move , e_copy , e_ignore } |
| Defines how existing log data is handled when changing log paths. More... | |
Public Member Functions | |
| void | addInput (const StringView &s) final override |
| Adds user input text to the default input guard. | |
| void | addInput (const StringView &s, uint04 idx) final override |
| Adds user input text associated with a specific input guard index. | |
| void | addLog (const StringView &name, InfoPipe *info) |
| Registers a named log pipe with this manager. | |
| virtual void | addMessage (uint04 id, const LogMessage &) override |
| Adds a structured log message to all child logs. | |
| virtual void | addMessage (uint04 id, const StringView &, uint01=10) override |
| Adds a raw string message to all child logs. | |
| virtual void | addMessage (uint04 id, const TranslatedString &, uint01=10) override |
| Adds a translated string message to all child logs. | |
| virtual void | addMessages (uint04 id, const Buffer< LogMessage > &) override |
| Adds multiple log messages to all child logs in a batch. | |
| void | addStream (LogStream *stream, bool add_all) override |
| Adds a log stream to this manager and optionally to all child logs. | |
| InfoPipe * | defaultLog () const |
| Retrieves the default log pipe named "DEFAULT". | |
| InfoPipe * | getLog (const StringView &log_name) const |
| Retrieves the log pipe associated with the given name. | |
| bool | hasLog (const StringView &log_name) const |
| Checks whether a log with the given name exists in this manager. | |
| const Dictionary< String, InfoPipe * > & | logs () |
| Returns a reference to the dictionary of all registered logs. | |
| void | logStartupInformation (const StringView &log) const |
| Logs system startup information such as environment and version details. | |
| fltp04 | progressIdx (uint04 idx) const final override |
| Gets the progress percentage for a specific progress source. | |
| void | readFromFile (BinaryFile &file, uint08 version_number) |
| Reads log data from a binary file. | |
| void | removeStream (LogStream *stream) override |
| Removes a log stream from this manager and all child logs. | |
| void | requestCancel () override |
| Requests cancellation of all ongoing operations across all child logs. | |
| virtual void | requestCancel (uint04 idx) override |
| Requests cancellation of a specific operation by index across 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. | |
| void | setProgressIdx (uint04 idx, fltp04 percent) final override |
| Sets the progress percentage for a specific progress source across all child logs. | |
| 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. | |
Private Member Functions | |
| uint04 | addCancelGuard (const TranslatedString &name) final override |
| Adds a new cancel guard with the given name. | |
| void | addCancelGuard (const TranslatedString &name, uint04 idx) final override |
| Adds a cancel guard at a specific index. | |
| uint04 | addInputGuard (const TranslatedString &name) final override |
| Adds a new input guard with the given name. | |
| void | addInputGuard (const TranslatedString &name, uint04 idx) final override |
| Adds an input guard at a specific index. | |
| uint04 | addProgressSource (const TranslatedString &name, fltp04 progress) final override |
| Registers a new progress source with the given name and initial progress. | |
| void | addProgressSource (const TranslatedString &name, uint04 idx, fltp04 progress) final override |
| Registers a progress source at a specific index. | |
| bool | cancelRequested () const final override |
| Checks whether any cancellation has been requested across all child logs. | |
| bool | cancelRequestedIdx (uint04 idx) const final override |
| Checks whether cancellation has been requested for a specific index. | |
| void | clearInputIdx (uint04 idx) final override |
| Clears the stored input text for a specific input guard index. | |
| void | getInputIdx (String &s, uint04 idx, bool clear) final override |
| Retrieves user input text for a specific input guard index. | |
| void | removeCancelGuard (uint04 idx) final override |
| Removes a cancel guard by index from all child logs. | |
| void | removeInputGuard (uint04 idx) final override |
| Removes an input guard by index from all child logs. | |
| void | removeProgressSource (uint04 idx) final override |
| Removes a progress source by index from all child logs. | |
A class that has any number of children that also feed into the log.
Can be used to easily collect logs from a variaty of different streams.
Definition at line 14 of file LogManager.h.
| enum LogManager::MoveMode |
Defines how existing log data is handled when changing log paths.
| Enumerator | |
|---|---|
| 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. |
Definition at line 20 of file LogManager.h.
|
finaloverrideprivatevirtual |
Adds a new cancel guard with the given name.
| [in] | name | The display name of the cancel guard. |
Implements InfoPipe.
|
finaloverrideprivatevirtual |
Adds a cancel guard at a specific index.
| [in] | name | The display name of the cancel guard. |
| [in] | idx | The index to assign. |
Implements InfoPipe.
|
finaloverridevirtual |
Adds user input text to the default input guard.
| [in] | s | The input string to add. |
Implements InfoPipe.
|
finaloverridevirtual |
Adds user input text associated with a specific input guard index.
| [in] | s | The input string to add. |
| [in] | idx | The index of the input guard. |
Implements InfoPipe.
|
finaloverrideprivatevirtual |
Adds a new input guard with the given name.
| [in] | name | The display name of the input guard. |
Implements InfoPipe.
References addInputGuard().
Referenced by addInputGuard(), and addInputGuard().
|
finaloverrideprivatevirtual |
Adds an input guard at a specific index.
| [in] | name | The display name of the input guard. |
| [in] | idx | The index to assign. |
Implements InfoPipe.
References addInputGuard().
| void LogManager::addLog | ( | const StringView & | name, |
| InfoPipe * | info ) |
Registers a named log pipe with this manager.
| [in] | name | The name to associate with the log. |
| [in] | info | The InfoPipe to register. |
|
overridevirtual |
Adds a structured log message to all child logs.
| [in] | id | The identifier for the message source. |
| [in] | message | The log message to add. |
Implements InfoPipe.
|
overridevirtual |
Adds a raw string message to all child logs.
| [in] | id | The identifier for the message source. |
| [in] | message | The string message to add. |
| [in] | log_level | The severity level of the message. |
Implements InfoPipe.
|
overridevirtual |
Adds a translated string message to all child logs.
| [in] | id | The identifier for the message source. |
| [in] | message | The translated message to add. |
| [in] | log_level | The severity level of the message. |
Implements InfoPipe.
|
overridevirtual |
Adds multiple log messages to all child logs in a batch.
| [in] | id | The identifier for the message source. |
| [in] | messages | The buffer of log messages to add. |
|
finaloverrideprivatevirtual |
Registers a new progress source with the given name and initial progress.
| [in] | name | The display name of the progress source. |
| [in] | progress | The initial progress value. |
Implements InfoPipe.
|
finaloverrideprivatevirtual |
Registers a progress source at a specific index.
| [in] | name | The display name of the progress source. |
| [in] | idx | The index to assign. |
| [in] | progress | The initial progress value. |
Implements InfoPipe.
|
overridevirtual |
Adds a log stream to this manager and optionally to all child logs.
| [in] | stream | The log stream to add. |
| [in] | add_all | If true, the stream is also added to all child logs. |
Reimplemented from InfoPipe.
|
finaloverrideprivatevirtual |
Checks whether any cancellation has been requested across all child logs.
Implements InfoPipe.
|
finaloverrideprivatevirtual |
Checks whether cancellation has been requested for a specific index.
| [in] | idx | The index of the cancel guard to check. |
Implements InfoPipe.
|
finaloverrideprivatevirtual |
Clears the stored input text for a specific input guard index.
| [in] | idx | The index of the input guard to clear. |
Implements InfoPipe.
References clearInputIdx().
Referenced by clearInputIdx().
|
inline |
Retrieves the default log pipe named "DEFAULT".
Definition at line 42 of file LogManager.h.
References getLog().
Retrieves user input text for a specific input guard index.
| [in] | s | The string to populate with the input value. |
| [in] | idx | The index of the input guard. |
| [in] | clear | If true, clears the stored input after retrieval. |
Reimplemented from InfoPipe.
References getInputIdx().
Referenced by getInputIdx().
| InfoPipe * LogManager::getLog | ( | const StringView & | log_name | ) | const |
Retrieves the log pipe associated with the given name.
| [in] | log_name | The name of the log to retrieve. |
Referenced by defaultLog(), BuildActionProgramLogic::executeMenuItems(), and BuildActionProgramLogic::setTreeWidgetsForSelection().
| bool LogManager::hasLog | ( | const StringView & | log_name | ) | const |
Checks whether a log with the given name exists in this manager.
| [in] | log_name | The name of the log to look up. |
| const Dictionary< String, InfoPipe * > & LogManager::logs | ( | ) |
Returns a reference to the dictionary of all registered logs.
| void LogManager::logStartupInformation | ( | const StringView & | log | ) | const |
Logs system startup information such as environment and version details.
| [in] | log | The name of the log to write startup information to. |
Gets the progress percentage for a specific progress source.
| [in] | idx | The index of the progress source. |
Reimplemented from InfoPipe.
| void LogManager::readFromFile | ( | BinaryFile & | file, |
| uint08 | version_number ) |
Reads log data from a binary file.
| [in] | file | The binary file to read from. |
| [in] | version_number | The format version number for deserialization. |
|
finaloverrideprivatevirtual |
Removes a cancel guard by index from all child logs.
| [in] | idx | The index of the cancel guard to remove. |
Implements InfoPipe.
|
finaloverrideprivatevirtual |
Removes an input guard by index from all child logs.
| [in] | idx | The index of the input guard to remove. |
Implements InfoPipe.
References removeInputGuard().
Referenced by removeInputGuard().
|
finaloverrideprivatevirtual |
Removes a progress source by index from all child logs.
| [in] | idx | The index of the progress source to remove. |
Implements InfoPipe.
|
overridevirtual |
Removes a log stream from this manager and all child logs.
| [in] | stream | The log stream to remove. |
Reimplemented from InfoPipe.
|
overridevirtual |
Requests cancellation of a specific operation by index across all child logs.
| [in] | idx | The index of the cancel guard to trigger. |
Implements InfoPipe.
Sets the default file path for ASCII log output, optionally moving or copying existing data.
| [in] | file | The file path for ASCII log output. |
| [in] | mode | Determines how existing log data is handled. |
Sets the progress percentage for a specific progress source across all child logs.
| [in] | idx | The index of the progress source. |
| [in] | percent | The progress value from 0.0 to 1.0. |
Implements InfoPipe.
| void LogManager::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.
| [in] | file | The binary file to write to. |
| [in] | minimum_log_level | The minimum severity level of messages to include. |
| [in] | mode | The compression mode to use when writing. |
References e_default_compression.