libsir 2.2.5
Standard Incident Reporter
|
Data Structures | |
struct | sir_errorinfo |
Information about an error that occurred. More... | |
struct | sir_textstyle |
Container for all the information associated with the appearance of text in the context of stdio. More... | |
struct | sir_stdio_dest |
Configuration for stdio destinations (stdout and stderr). More... | |
struct | sir_syslog_dest |
Configuration for the system logger destination. More... | |
struct | sirinit |
libsir initialization and configuration data. More... | |
struct | sir_syslog_dest._state |
Reserved for internal use; do not modify. More... | |
Macros | |
#define | SIRL_NONE 0x0000U |
No output. | |
#define | SIRL_EMERG 0x0001U |
Nuclear war, Armageddon, etc. | |
#define | SIRL_ALERT 0x0002U |
Action required ASAP. | |
#define | SIRL_CRIT 0x0004U |
Critical errors. | |
#define | SIRL_ERROR 0x0008U |
Errors. | |
#define | SIRL_WARN 0x0010U |
Warnings that could likely be ignored. | |
#define | SIRL_NOTICE 0x0020U |
Normal but significant. | |
#define | SIRL_INFO 0x0040U |
Informational messages. | |
#define | SIRL_DEBUG 0x0080U |
Debugging/diagnostic output. | |
#define | SIRL_ALL 0x00ffU |
Include all logging levels. | |
#define | SIRL_DEFAULT 0x0100U |
Default levels for this type of destination. | |
#define | SIRO_ALL 0x00000000U |
Include all formatting and functionality. | |
#define | SIRO_NOTIME 0x00000100U |
Exclude time stamps (implies SIRO_NOMSEC). | |
#define | SIRO_NOMSEC 0x00000200U |
Exclude millisecond-resolution in time stamps. | |
#define | SIRO_NOHOST 0x00000400U |
Exclude local hostname. | |
#define | SIRO_NOLEVEL 0x00000800U |
Exclude human-readable logging level. | |
#define | SIRO_NONAME 0x00001000U |
Exclude process/app name. | |
#define | SIRO_NOPID 0x00002000U |
Exclude process ID. | |
#define | SIRO_NOTID 0x00004000U |
Exclude thread ID/name. | |
#define | SIRO_NOHDR 0x00010000U |
Don't write header messages to log files. | |
#define | SIRO_MSGONLY 0x00007f00U |
Sets all other options except SIRO_NOHDR. | |
#define | SIRO_DEFAULT 0x00100000U |
Default options for this type of destination. | |
Typedefs | |
typedef uint32_t | sirfileid |
Log file identifier type. | |
typedef uint32_t | sirpluginid |
Plugin module identifier type. | |
typedef uint16_t | sir_level |
The sir_level type. | |
typedef uint16_t | sir_levels |
sir_level bitmask type. | |
typedef uint32_t | sir_option |
The sir_option type. | |
typedef uint32_t | sir_options |
sir_option bitmask type. | |
typedef uint32_t | sir_textcolor |
stdio text color type. | |
struct sir_errorinfo |
Information about an error that occurred.
Granular error information in order to provide the caller with flexibility in regards to error handling and formatting.
Data Fields | ||
---|---|---|
uint16_t | code | Numeric error code (see sir_errorcode). |
const char * | file | Name of the file in which the error occurred. |
const char * | func | Name of the function in which the error occurred. |
uint32_t | line | Line number at which the error occurred. |
char | msg[SIR_MAXERROR] | Error message associated with code. |
int | os_code | If an OS/libc error, the relevant code. |
char | os_msg[SIR_MAXERROR] | If an OS/libc error, the relevant message. |
struct sir_textstyle |
Container for all the information associated with the appearance of text in the context of stdio.
For 4-bit (16-color) and 8-bit (256-color) modes, fg and bg are simply the associated SIRTC_* value. For 24-bit RGB color mode, fg and bg are packed as follows: 0x00rrggbb.
Data Fields | ||
---|---|---|
sir_textattr | attr | Text attributes. |
sir_textcolor | bg | Background color. |
sir_textcolor | fg | Foreground color. |
struct sir_stdio_dest |
Configuration for stdio destinations (stdout and stderr).
Data Fields | ||
---|---|---|
sir_levels | levels | sir_level bitmask defining output levels to register for. |
sir_options | opts | sir_option bitmask defining the formatting of output. |
struct sir_syslog_dest |
Configuration for the system logger destination.
Data Fields | ||
---|---|---|
struct sir_syslog_dest._state | _state | Reserved for internal use; do not modify. |
char | category[SIR_MAX_SYSLOG_CAT] |
The category string to pass to the system logger.
|
char | identity[SIR_MAX_SYSLOG_ID] |
The identity string to pass to the system logger.
|
sir_levels | levels | sir_level bitmask defining levels to register for. |
sir_options | opts |
sir_option bitmask defining the formatting of output.
Furthermore, the supported options vary based on the system logging facility in use.
|
struct sirinit |
libsir initialization and configuration data.
Data Fields | ||
---|---|---|
sir_stdio_dest | d_stderr | stderr configuration. |
sir_stdio_dest | d_stdout | stdout configuration. |
sir_syslog_dest | d_syslog | System logger configuration. |
char | name[SIR_MAXNAME] |
The name to use in log messages (usually the process name). Set SIRO_NONAME in a destination's options bitmask to suppress it. |
struct sir_syslog_dest._state |
anonymous enum |
Colors for stdio output (16-color mode).
enum sir_colormode |
enum sir_errorcode |
Error codes.
enum sir_textattr |