EC_LOG_DEFAULT_CB(3)
π EC_LOG_DEFAULT_CB π
okay so bestie, this one lives in the libecoli programmer's manual, section 3, and it's literally the default log handler. like, the one that's already doing the most before you even touch anything. let's get into it π«Ά
β¨ NAME β¨
ec_log_default_cb β the Default log handler. she's the blueprint, the OG, the main character of logging π
β¨ SYNOPSIS β¨
#include <ecoli/log.h>
int ec_log_default_cb(
int type, /* The log type identifier. */
enum ec_log_level level, /* The log level. */
void *opaque, /* Unused. */
const char *str /* The string to be logged. */
);
okay so like, four args, one int coming back at ya. noted. π
β¨ DESCRIPTION β¨
This is the default log function that the library uses. like, out of the box, no setup, no nothing. π
By default it prints all the logs whose level is WARNING or more critical. so the spicy ones. the ones that actually matter. π₯
And if you wanna change that level? totally doable β just hit up ec_log_level_set(). you're welcome. π
β¨ STRUCTURES β¨
here's the level enum, in all her glory. it goes from "we are so cooked" all the way down to "just chatting":
enum ec_log_level {
EC_LOG_EMERG;
EC_LOG_ALERT;
EC_LOG_CRIT;
EC_LOG_ERR;
EC_LOG_WARNING;
EC_LOG_NOTICE;
EC_LOG_INFO;
EC_LOG_DEBUG;
};
EC_LOG_EMERG is at the top and EC_LOG_DEBUG is at the bottom, and that ordering is literally the whole vibe check of the thing. β¨
β¨ RETURN VALUE β¨
0on success π-1on error, anderrnogets set π (as is tradition)
β¨ SEE ALSO β¨
go be nosy, bestie, they're all right here:
ec_log_fct_register(3)ec_log_level_set(3)ec_vlog(3)ec_log_level_get(3)ec_log_name(3)ec_log(3)ec_log_type_register(3)
β¨ COPYRIGHT β¨
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
and that's the whole page, bestie!! π¦ this one's from libecoli, dated 2026-06-11, and it's EC_LOG_DEFAULT_CB(3) in case you lost the plot. go forth and log responsibly πβ¨π
π¦ where this page comes from
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms