EC_LOG_FCT_REGISTER(3)

πŸ’– EC_LOG_FCT_REGISTER πŸ’–

okay so bestie, welcome to EC_LOG_FCT_REGISTER(3) from the Libecoli Programmer's Manual β€” yes we're in section 3, we're in the library, we're thriving ✨

This one is called ec_log_fct_register and its whole vibe is: you get to register a user log function. that's it. that's the girl. she's a lil registrar πŸŽ€


✨ NAME ✨

ec_log_fct_register β€” Register a user log function. πŸ’…


🌸 SYNOPSIS 🌸

#include <ecoli/log.h>

int ec_log_fct_register(
    /*
     * Function pointer that will be invoked for each log call. If the
     * parameter is NULL, ec_log_default_cb() is used.
     */
    ec_log_t  usr_log,
    void     *opaque    /* Opaque pointer passed to the log function. */
);

okay so let's talk about these two little guys:

  • usr_log β€” this is the function pointer that gets invoked for each log call. and listen, if you hand it NULL? no stress, ec_log_default_cb() is used instead. she's the understudy and she's ready 🫢
  • opaque β€” an opaque pointer that gets passed to the log function. mysterious. iconic. we don't ask what's inside, we just pass her along πŸ™ˆ

πŸ¦‹ RETURN VALUE πŸ¦‹

  • 0 on success πŸŽ‰
  • -1 on error 😭 (and errno is set, so go check on her)

🌈 SEE ALSO 🌈

the whole friend group, fr fr:


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.


no cap, that's the whole page. go register your function, bestie, it's giving main character energy πŸ’œ

libecoli Β· 2026-06-11 Β· EC_LOG_FCT_REGISTER(3) β€” mwah, that's a wrap, iykyk πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from