EC_LOG_TYPE_REGISTER(3)
β¨ EC_LOG_TYPE_REGISTER β¨
okay bestie, welcome to the Libecoli Programmer's Manual π you're literally about to learn how to register a log type and honestly? it's giving main character energy. no cap.
πΈ NAME πΈ
ec_log_type_register β register a named log type. that's it, that's the whole job. iconic. π
π¦ SYNOPSIS π¦
#include <ecoli/log.h>
int ec_log_type_register(
struct ec_log_type *type /* The log type to register. */
);
π DESCRIPTION π
so basically, bestie: this registers a new log type, and that log type gets identified by its name. π
the function hands you back a log identifier associated with the log name. and here's the cute part β if the name is already registered, it doesn't get mad, it doesn't duplicate anything, it just quietly returns the identifier you already have. lowkey so polite of it. π«Ά
π§ STRUCTURES π§
a structure describing a log type, fr fr.
it is defined as a static structure</> by the EC_LOG_TYPE_REGISTER() macro. π
struct ec_log_type {
enum level;
int id;
};
π RETURN VALUE π
- the log type identifier on success β and yes that's positive or zero, both count π
-1on error, anderrnois set (so go check it, bestie, don't just sit there π)
π₯ SEE ALSO π₯
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_default_cb(3)
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
and that's the whole page, periodt. π β¨ this lil slice of the libecoli Programmer's Manual was served fresh on 2026-06-11 β go forth and register those log types, bestie, you ate. ππ¦π
π¦ 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