|
MsPASS C++ API
2.4.1.dev4+g92330b7a
Defines the C++ API for MsPASS
|
One error-log record with provenance and severity. More...
#include <ErrorLogger.h>

Public Member Functions | |
| LogData () | |
| LogData (const int jid, const std::string alg, const mspass::utility::MsPASSError &merr) | |
| LogData (const int jid, const std::string alg, const std::string msg, const mspass::utility::ErrorSeverity lvl) | |
Public Attributes | |
| int | job_id |
| int | p_id |
| std::string | algorithm |
| mspass::utility::ErrorSeverity | badness |
| std::string | message |
Friends | |
| std::ostream & | operator<< (std::ostream &, LogData &) |
One error-log record with provenance and severity.
|
inline |
Construct an empty log record.
| mspass::utility::LogData::LogData | ( | const int | jid, |
| const std::string | alg, | ||
| const mspass::utility::MsPASSError & | merr | ||
| ) |
Normal constuctor from a MsPASSError or child of same.
| jid | is the value to assign to job_id. |
| alg | is assigned to algorithm attribute. |
| merr | is parsed to fill the message and severity fields. Note p_id is always fetched with the system call getpid in the constructor. |
References algorithm, badness, job_id, message, p_id, mspass::utility::MsPASSError::severity(), and mspass::utility::MsPASSError::what().
| mspass::utility::LogData::LogData | ( | const int | jid, |
| const std::string | alg, | ||
| const std::string | msg, | ||
| const mspass::utility::ErrorSeverity | lvl | ||
| ) |
Normal constuctor from strings.
| jid | is the value to assign to job_id. |
| alg | is assigned to algorithm attribute. |
| msg | is the error message. |
| lvl | is the error severity. Note p_id is always fetched with the system call getpid in the constructor. |
|
friend |
Stream one log record to an output stream.
| std::string mspass::utility::LogData::algorithm |
Algorithm or component that posted the message.
| mspass::utility::ErrorSeverity mspass::utility::LogData::badness |
Severity assigned to the message.
| int mspass::utility::LogData::job_id |
Processing job identifier.
| std::string mspass::utility::LogData::message |
Human-readable log message.
| int mspass::utility::LogData::p_id |
Process id returned by getpid().