EC_LOG(3)
EC_LOG(3) β bestie, we're logging π
okay so this is from the Libecoli Programmer's Manual, section 3 (library calls, iykyk), and it's literally justβ¦ the log function. the one you call when you want to say something into the void and have the void write it down with a timestamp-ish vibe. it's giving β¨ ec_log β¨ β "Log a formatted string." that's the whole NAME section, that's it, that's the tea π«
πΈ NAME πΈ
ec_log β log a formatted string, bestie. that's it. that's the function. π
β¨ SYNOPSIS β¨
first things first, you gotta pull in the header or nothing happens, no cap:
#include <ecoli/log.h>
then the function itself, in all its glory β every comment included because I am not gatekeeping:
int ec_log(
int type, /* The log type identifier. */
enum ec_log_level level, /* The log level. */
/*
* The format string, followed by optional arguments.
*/
const char *format,
...
);
so like. you hand it a type (the log type identifier π·οΈ), you hand it a level (the log level, from that enum below, stay tuned), and then you hand it a format string β and after that format string, the optional arguments. yes queen, it's a variadic. it's printf-coded. π
π¦ STRUCTURES π¦
here's the whole level menu, from "the world is ending" 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;
};
eight levels, all present, all accounted for, nothing skipped, periodt. π
π RETURN VALUE π
0on success β slay, it worked π-1on error, and when that happens,errnois set. so go checkerrno, bestie, it's telling you what went wrong π
π₯ SEE ALSO π₯
the whole friend group, go read these too, they're all iconic:
ec_log_fct_register(3)ec_log_level_set(3)ec_vlog(3)ec_log_level_get(3)ec_log_name(3)ec_log_default_cb(3)ec_log_type_register(3)
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
and that's the page!! π this whole thing lives in the libecoli manual, dated 2026-06-11, and if you ever forget it, just yell man 3 EC_LOG and it'll come running. mwah, bye bestie π§β¨π«Ά
π¦ 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