1gensio_set_log_mask(3)     Library Functions Manual     gensio_set_log_mask(3)
2
3
4

NAME

6       gensio_set_log_mask,  gensio_get_log_mask,  gensio_log_level_to_str,  -
7       Logging and seting which gensio logs are passed or ignored
8

SYNOPSIS

10       #include <gensio/gensio.h>
11
12       void gensio_set_log_mask(unsigned int mask);
13
14       unsigned int gensio_get_log_mask(void);
15
16       const char *gensio_log_level_to_str(enum gensio_log_levels level);
17
18       void gensio_vlog(struct gensio_os_funcs *o,
19                           enum gensio_log_levels level,
20                           const char *str, va_list args);
21
22       void gensio_log(struct gensio_os_funcs *o,
23                           enum gensio_log_levels level,
24                           const char *str, ...);
25

DESCRIPTION

27       The log mask is a global variable in the gensio library that sets  what
28       level  of  logs are delivered through the vlog function pointer in gen‐
29       sio_os_funcs.  Log levels are:
30
31
32              GENSIO_LOG_FATAL    GENSIO_LOG_ERR    GENSIO_LOG_WARNING    GEN‐
33              SIO_LOG_INFO GENSIO_LOG_DEBUG
34
35       with obvious meanings.  There is also:
36
37
38              GENSIO_LOG_MASK_ALL
39
40       which is a bitmask of all the log levels.
41
42       The  default log mask is (1 << GENSIO_LOG_FATAL | 1 << GENSIO_LOG_ERR).
43       Setting other log values can be helpful in debugging problems with gen‐
44       sios.
45
46       gensio_log_level_to_str converts a log level to a string representation
47       of that level.
48
49       gensio_vlog and gensio_log are the functions  used  to  generate  logs.
50       These  are  primarily for use in the gensio library, though you may use
51       them, too, if you like.
52

SEE ALSO

54       gensio(5), gensio_os_funcs(3)
55
56
57
58                                  23 Feb 2019           gensio_set_log_mask(3)
Impressum