1DC_CONTEXT_SET_LOGLEV... BSD Library Functions Manual DC_CONTEXT_SET_LOGLEV...
2

NAME

4     dc_context_set_loglevel — set the logging level for a dive computer con‐
5     text
6

LIBRARY

8     library “libdivecomputer”
9

SYNOPSIS

11     #include <libdivecomputer/context.h>
12
13     dc_status_t
14     dc_context_set_loglevel(dc_context_t *context, dc_loglevel_t loglevel);
15

DESCRIPTION

17     Set the minimum log level required to raise a logging event with the
18     dc_context_set_logfunc(3) callback.  Operates on a dive computer context
19     created with dc_context_new(3).  The log levels are ordered as follows:
20
21     1.   DC_LOGLEVEL_NONE
22
23     2.   DC_LOGLEVEL_ERROR
24
25     3.   DC_LOGLEVEL_WARNING
26
27     4.   DC_LOGLEVEL_INFO
28
29     5.   DC_LOGLEVEL_DEBUG
30
31     6.   DC_LOGLEVEL_ALL
32
33     By setting, for exammple, DC_LOGLEVEL_INFO, all events of
34     DC_LOGLEVEL_ERROR, DC_LOGLEVEL_WARNING, and DC_LOGLEVEL_INFO will be
35     reported via the callback in dc_context_set_logfunc(3).
36

RETURN VALUES

38     Returns DC_STATUS_OK on setting the log level, DC_STATUS_INVALIDARGS if
39     context is NULL, or another error code on failure.
40

SEE ALSO

42     dc_context_new(3), dc_context_set_logfunc(3)
43

AUTHORS

45     The library “libdivecomputer” library was written by Jef Driesen,
46     jef@libdivecomputer.org.  The manpages were written by
47     Kristaps Dzonsons, kristaps@bsd.lv.
48
49BSD                             January 5, 2017                            BSD
Impressum