GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DC_CONTEXT_SET_LOGFUNC(3) FreeBSD Library Functions Manual DC_CONTEXT_SET_LOGFUNC(3)

dc_context_set_logfuncset 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:

context
The context in which it was invoked.
loglevel
The level of the log message.
file
The source file where the message was raised.
line
The source line (from 1) where the message was raised.
function
The function that raised the log message.
message
The log message itself.
userdata
The pointer passed to 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.

dc_context_new(3), dc_context_set_loglevel(3)

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

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.