DC_CONTEXT_SET_LOGFUNC(3) | FreeBSD Library Functions Manual | DC_CONTEXT_SET_LOGFUNC(3) |
dc_context_set_logfunc
—
set the logging function for a dive computer
context
library “libdivecomputer”
#include
<libdivecomputer/context.h>
typedef void
(*dc_logfunc_t)
(dc_context_t
*context, dc_loglevel_t loglevel,
const char *file, unsigned int
line, const char *function,
const char *message, void
*userdata);
dc_status_t
dc_context_set_logfunc
(dc_context_t
*context, dc_logfunc_t logfunc,
void *userdata);
Set the logging function logfunc associated with a dive computer context. The logging function is invoked with argument userdata when the log level (see dc_context_set_loglevel(3)) has been exceeded.
The logfunc accepts the following values:
dc_context_set_logfunc
.Returns DC_STATUS_OK
on setting the log
level, DC_STATUS_INVALIDARGS
if
context is NULL
, or another
error code on failure.
The library
“libdivecomputer” library was written by
Jef Driesen,
jef@libdivecomputer.org.
The manpages were written by
Kristaps Dzonsons,
kristaps@bsd.lv.
January 5, 2017 | FreeBSD 14.3-RELEASE |