DC_CONTEXT_SET_LOGLEVEL(3)
okay so bestie, this is DC_CONTEXT_SET_LOGLEVEL(3) from the Library Functions Manual, and it's giving very much libdivecomputer energy π
β¨. no cap, we're about to make log levels make sense.
π NAME π
dc_context_set_loglevel β set the logging level for a dive computer context, periodt π
π LIBRARY π
bestie this one lives in the library libdivecomputer β iconic, we know π¦
β¨ SYNOPSIS β¨
#include <libdivecomputer/context.h>
dc_status_t
dc_context_set_loglevel(dc_context_t *context, dc_loglevel_t loglevel);
πΈ DESCRIPTION πΈ
okay so the whole vibe: this sets the minimum log level required to raise a logging event with the dc_context_set_logfunc(3) callback. It operates on a dive computer context created with dc_context_new(3). lowkey important, highkey useful π
The log levels are ordered like this, and yes, the order is the whole point:
DC_LOGLEVEL_NONEDC_LOGLEVEL_ERRORDC_LOGLEVEL_WARNINGDC_LOGLEVEL_INFODC_LOGLEVEL_DEBUGDC_LOGLEVEL_ALL
By setting, for example, DC_LOGLEVEL_INFO, all events of DC_LOGLEVEL_ERROR, DC_LOGLEVEL_WARNING, and DC_LOGLEVEL_INFO will be reported via the callback in dc_context_set_logfunc(3). so yes, you get the errors, warnings, and info events in the group chat ππ₯
π«Ά RETURN VALUES π«Ά
Returns DC_STATUS_OK on setting the log level, DC_STATUS_INVALIDARGS if context is NULL, or another error code on failure. ngl, that NULL check is doing main character work π
π SEE ALSO π
π AUTHORS π
The library libdivecomputer was written by Jef Driesen, jef@libdivecomputer.org. The manpages were written by Kristaps Dzonsons, kristaps@bsd.lv. absolute legends, fr fr π«‘π
mwah π that's the whole page, bestie β brought to you by Debian on January 5, 2017, and it's DC_CONTEXT_SET_LOGLEVEL(3). byeee π«Άπ
π¦ where this page comes from
- nixos 26.05: libdivecomputer 0.9.0
- nixpkgs unstable: libdivecomputer 0.9.0
- Copyright (C) 2017 Kristaps Dzonsons <kristaps@bsd.lv>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms