#include <def.hpp>
|
| | FIMSLog () |
| |
| | ~FIMSLog () |
| |
| std::filesystem::path | getAbsolutePathWithoutDotDot (const std::filesystem::path &relativePath) |
| | Get the Absolute Path Without Dot Dot object.
|
| |
| void | set_path (std::string path) |
| |
| std::string | get_path () |
| |
| void | info_message (std::string str, int line, const char *file, const char *func) |
| |
| void | debug_message (std::string str, int line, const char *file, const char *func) |
| |
| void | error_message (std::string str, int line, const char *file, const char *func) |
| |
| void | warning_message (std::string str, int line, const char *file, const char *func) |
| |
| std::string | get_log () |
| |
| std::string | get_errors () |
| |
| std::string | get_warnings () |
| |
| std::string | get_info () |
| |
| std::string | get_module (const std::string &module) |
| |
|
size_t | get_error_count () const |
| | Get the counts of the number of errors.
|
| |
|
size_t | get_warning_count () const |
| | Get the counts of the number of warnings.
|
| |
|
void | clear () |
| | Clears all pointers/references of a FIMS model.
|
| |
|
|
bool | write_on_exit = true |
| | A boolean specifying if the log file is written when the session is terminated. The default is TRUE.
|
| |
|
bool | throw_on_error = false |
| | A boolean specifying if the program is stopped upon the first error, where the default is FALSE. This allows you go through an entire program to collect all error messages.
|
| |
|
|
static std::shared_ptr< FIMSLog > | fims_log = std::make_shared<FIMSLog>() |
| | A singleton instance of the log, i.e., where there is only one log. The object is created when the .dll is loaded and it will never be recreated while the .dll is loaded.
|
| |
◆ FIMSLog()
| fims::FIMSLog::FIMSLog |
( |
| ) |
|
|
inline |
◆ ~FIMSLog()
| fims::FIMSLog::~FIMSLog |
( |
| ) |
|
|
inline |
Destructor. If write_on_exit is set to true, the log will be written to the disk in JSON format.
◆ debug_message()
Add a "debug" level message to the log.
- Parameters
-
◆ error_message()
Add a "error" level message to the log.
- Parameters
-
◆ get_errors()
| std::string fims::FIMSLog::get_errors |
( |
| ) |
|
|
inline |
Return only error entries from the log.
- Returns
◆ get_info()
| std::string fims::FIMSLog::get_info |
( |
| ) |
|
|
inline |
Return only info entries from the log.
- Returns
◆ get_log()
| std::string fims::FIMSLog::get_log |
( |
| ) |
|
|
inline |
Get the log as a string object.
- Returns
◆ get_module()
| std::string fims::FIMSLog::get_module |
( |
const std::string & |
module | ) |
|
|
inline |
Query the log by module.
- Parameters
-
- Returns
◆ get_path()
| std::string fims::FIMSLog::get_path |
( |
| ) |
|
|
inline |
Get the path for the log file.
- Returns
◆ get_warnings()
| std::string fims::FIMSLog::get_warnings |
( |
| ) |
|
|
inline |
Return only warning entries from the log.
- Returns
◆ getAbsolutePathWithoutDotDot()
| std::filesystem::path fims::FIMSLog::getAbsolutePathWithoutDotDot |
( |
const std::filesystem::path & |
relativePath | ) |
|
|
inline |
Get the Absolute Path Without Dot Dot object.
Dot dot notation is for relative paths, where this function replaces all dot dots with the actual full path.
- Parameters
-
| relativePath | A path in your file system. |
- Returns
- std::filesystem::path
◆ info_message()
Add a "info" level message to the log.
- Parameters
-
◆ set_path()
| void fims::FIMSLog::set_path |
( |
std::string |
path | ) |
|
|
inline |
Set a path for the log file.
- Parameters
-
◆ warning_message()
Add a "warning" level message to the log.
- Parameters
-
The documentation for this class was generated from the following file: