![]() |
FIMS
v0.9.2
|
Platform macros and the core FIMS logging system. More...
#include <fstream>#include <map>#include <memory>#include <vector>#include <string>#include <unordered_map>#include <cstdlib>#include <chrono>#include <sstream>#include <iostream>#include <filesystem>#include <stdlib.h>#include <signal.h>#include <csignal>#include <cstring>#include <stdexcept>Go to the source code of this file.
Classes | |
| struct | fims::LogEntry |
| A data structure with defined fields for a single log record. More... | |
| class | fims::FIMSLog |
| Singleton logger for FIMS. More... | |
Macros | |
| #define | FIMS_INFO_LOG(MESSAGE) |
| Record an info-log entry with metadata. | |
| #define | FIMS_WARNING_LOG(MESSAGE) |
| #define | FIMS_ERROR_LOG(MESSAGE) |
| #define | FIMS_STR(s) #s |
| Convert a preprocessor token to a string literal. | |
Functions | |
| void | fims::WriteAtExit (int sig) |
| Signal handler that records a terminal error and flushes log entries. | |
| template<typename T > | |
| std::string | fims::to_string (T v) |
Platform macros and the core FIMS logging system.
The logging macro captures MESSAGE plus the call-site metadata (__LINE__, __FILE__, and __PRETTY_FUNCTION__) and forwards those values to error_message.
| MESSAGE | Human-readable log message describing what happened and why. |
Record an info-log entry with metadata.
The logging macro captures MESSAGE plus the call-site metadata (__LINE__, __FILE__, and __PRETTY_FUNCTION__) and forwards those values to info_message.
| MESSAGE | Human-readable log message describing what happened and why. |
Convert a preprocessor token to a string literal.
| s | Input text from the macro that will be converted to a string. |
The logging macro captures MESSAGE plus the call-site metadata (__LINE__, __FILE__, and __PRETTY_FUNCTION__) and forwards those values to warning_message.
| MESSAGE | Human-readable log message describing what happened and why. |
Converts an object T to a string.
The object v of type T must be able to be written to a std::ostream with the << operator.
| v | Value to convert to text using a string stream. |
v. Signal handler that records a terminal error and flushes log entries.
On receipt of a supported signal, this function appends an error-level entry, writes the full log if write_on_exit is enabled, restores the default signal handler, and re-raises the signal.
| sig | Integer signal identifier provided by the operating system when this handler is called (for example, SIGSEGV for invalid memory access, SIGINT for an interrupt such as Ctrl+C, or SIGTERM for a termination request). |