Typedefs | |
typedef ix_log_s | ix_log_t |
Enumerations | |
enum | ix_verbose_e { IX_V_LOG = 0x000, IX_V_ERROR = 0x001, IX_V_PLAIN = 0x80000000, IX_V_ALL = 0xFFFFFFFF } |
Functions | |
void | ix_log (unsigned long flag, char *text,...) |
void | ix_log_level (unsigned long int mask) |
unsigned long int | ix_log_getlevel (void) |
void | ix_log_name (char *name) |
void | ix_log_node (int node) |
void | ix_log_sys (int flag) |
int | ix_log_getsys (void) |
ix_log_t * | ix_logfac_new (char *facility, unsigned long int errlevel) |
void | ix_logfac_free (ix_log_t *plog) |
void | ix_logfac_log (ix_log_t *plog, unsigned long flag, char *text,...) |
void | ix_logfac_level (ix_log_t *plog, unsigned long int mask) |
unsigned long int | ix_logfac_getlevel (ix_log_t *plog) |
int | ix_log_mask64 (uint64_t v, char *buffer, int len) |
int | ix_log_mask32 (uint32_t v, char *buffer, int len) |
int | ix_snprint (char *buffer, size_t buflen, char *str) |
int | ix_hexnprint (char *buf, size_t buflen, unsigned char *byte, size_t len) |
typedef struct ix_log_s ix_log_t |
log facility object
enum ix_verbose_e |
pre-defined global log levels: The log-messages with level IX_V_LOG or IX_V_ERROR are always logged, you have to add your own log levels 0x002, 0x004, 0x008,0x010, 0x020,... and set the desired log mask with ix_log_level()
int ix_hexnprint | ( | char * | buf, | |
size_t | buflen, | |||
unsigned char * | byte, | |||
size_t | len | |||
) |
Utility function for logging, prints an array of bytes as hexadecimal output to buffer
buf | buffer to print to | |
buflen | sizeof of buffer | |
byte | array of bytes | |
len | length of byte array |
void ix_log | ( | unsigned long | flag, | |
char * | text, | |||
... | ||||
) |
The log message text is logged if flag is set in log_level mask (see ix_log_level()). The text may contain printf format specifier corresponding to the arguments
flag | log level of log message | |
text | log message |
unsigned long int ix_log_getlevel | ( | void | ) |
gets loglevel
int ix_log_getsys | ( | void | ) |
get syslog enable flag
void ix_log_level | ( | unsigned long int | mask | ) |
sets loglevel to mask
mask | loglevel to set |
int ix_log_mask32 | ( | uint32_t | v, | |
char * | buffer, | |||
int | len | |||
) |
Utility function for logging, print 64 bit v as bitpattern to buffer
v | ||
buffer | ||
len | sizeof buffer |
int ix_log_mask64 | ( | uint64_t | v, | |
char * | buffer, | |||
int | len | |||
) |
Utility function for logging, print 32 bit v as bitpattern to buffer
v | ||
buffer | ||
len | sizeof buffer |
void ix_log_name | ( | char * | name | ) |
sets caption name for log messages
name | caption name |
void ix_log_node | ( | int | node | ) |
sets caption node number for log messages
node | node number |
void ix_log_sys | ( | int | flag | ) |
enables logging via syslogd
flag |
|
void ix_logfac_free | ( | ix_log_t * | plog | ) |
close a local loging group and free all resources
unsigned long int ix_logfac_getlevel | ( | ix_log_t * | plog | ) |
get log facility log level: see ix_log_level()
plog | log facility object |
void ix_logfac_level | ( | ix_log_t * | plog, | |
unsigned long int | mask | |||
) |
set log facility log level: see ix_log_level()
plog | log facility object | |
mask | loglevel to set |
void ix_logfac_log | ( | ix_log_t * | plog, | |
unsigned long | flag, | |||
char * | text, | |||
... | ||||
) |
log facility log-function: see ix_log()
plog | log facility object | |
flag | log level of log message | |
text | log message |
ix_log_t* ix_logfac_new | ( | char * | facility, | |
unsigned long int | errlevel | |||
) |
create a local loging facility
facility | caption for log messages under this group | |
errlevel | level which is considered to present the error messages |
int ix_snprint | ( | char * | buffer, | |
size_t | buflen, | |||
char * | str | |||
) |
Utility function for logging, prints the string str to buffer
buffer | ||
buflen | sizeof of buffer | |
str |