|
CTaps 0.3.0
A C implementation of the Transport Services API (RFC 9621 - 9623)
|
Log level configuration and file output. More...
Enumerations | |
| enum | ct_log_level_enum_t { CT_LOG_TRACE = 0 , CT_LOG_DEBUG = 1 , CT_LOG_INFO = 2 , CT_LOG_WARN = 3 , CT_LOG_ERROR = 4 } |
| Log level enumeration for filtering log output. More... | |
Functions | |
| void | ct_set_log_level (ct_log_level_enum_t level) |
| Set the minimum logging level for CTaps. | |
| int | ct_add_log_file (const char *file_path, ct_log_level_enum_t min_level) |
| Add a file output destination for CTaps logs. | |
Log level configuration and file output.
| enum ct_log_level_enum_t |
Log level enumeration for filtering log output.
Log levels range from TRACE (most verbose) to ERROR (critical errors only). Setting a log level filters out all messages below that level.
| int ct_add_log_file | ( | const char * | file_path, |
| ct_log_level_enum_t | min_level | ||
| ) |
Add a file output destination for CTaps logs.
Logs will be written to the specified file in addition to stderr. Multiple files can be added, each with their own minimum log level.
| [in] | file_path | Path to the log file (will be created/appended) |
| [in] | min_level | Minimum log level to write to this file |
| void ct_set_log_level | ( | ct_log_level_enum_t | level | ) |
Set the minimum logging level for CTaps.
Only log messages at or above this level will be output. By default, CTaps logs at CT_LOG_INFO level and above.
| [in] | level | Minimum log level (CT_LOG_TRACE through CT_LOG_ERROR) |