|
libu8
|
These functions provide various ways of logging program events. More...
Functions | |
| U8_EXPORT int | u8_logger (int priority, u8_condition c, u8_string message) |
| Possibly generates a log message for an (optional) condition. | |
| U8_EXPORT int | u8_log (int priority, u8_condition c, u8_string format_string,...) |
| Possibly formats a log message for an (optional) condition. | |
| U8_EXPORT u8_string | u8_message_prefix (u8_byte *buf, int buflen) |
| Generates a message prefix into the given buffer, with output including process information controlled by the various u8_log_show variables. | |
| U8_EXPORT void | u8_syslog (int priority, u8_string format_string,...) |
| Formats and outputs a string using syslog and the given priority level. | |
| U8_EXPORT void | u8_use_syslog (int flag) |
| Control whether syslog is used together with stdio output. | |
These functions provide various ways of logging program events.
| U8_EXPORT int u8_log | ( | int | priority, |
| u8_condition | c, | ||
| u8_string | format_string, | ||
| ... | |||
| ) |
Possibly formats a log message for an (optional) condition.
Whether and where this produces output depends on how the program is linked and configured.
| priority | an (int [-1,7]) priority level |
| c | a string describing the condition (possibly NULL) |
| format_string | a utf-8 printf-like format string |
| ... | arguments for the format string |
| U8_EXPORT int u8_logger | ( | int | priority, |
| u8_condition | c, | ||
| u8_string | message | ||
| ) |
Possibly generates a log message for an (optional) condition.
Whether and where this produces output depends on how the program is linked and configured.
| priority | an (int [-1,7]) priority level |
| c | a string describing the condition (possibly NULL) |
| message | the content of the message to be emmited |
| U8_EXPORT u8_string u8_message_prefix | ( | u8_byte * | buf, |
| int | buflen | ||
| ) |
Generates a message prefix into the given buffer, with output including process information controlled by the various u8_log_show variables.
If buflen doesn't allow all the information to be shown, some information may be removed.
| buf | a byte buffer in which to compose the prefix |
| buflen | the number of bytes in the buffer |
| U8_EXPORT void u8_syslog | ( | int | priority, |
| u8_string | format_string, | ||
| ... | |||
| ) |
Formats and outputs a string using syslog and the given priority level.
This does its output if u8_loglevel is greater than 0.
| priority | an (int) priority level passed to syslog |
| format_string | a utf-8 printf-like format string |
| ... | arguments for the format string |
| U8_EXPORT void u8_use_syslog | ( | int | flag | ) |
Control whether syslog is used together with stdio output.
If flag is 1, syslog is used for notifications and warnings, together with the stderr.
| flag | int |
1.7.4