EC_VLOG(3)

✨ EC_VLOG(3) ✨

okay bestie, this one lives in the Libecoli Programmer's Manual and it's literally the function that makes your logs look cute and formatted instead of a hot mess πŸ’…


🌸 NAME 🌸

ec_vlog β€” bestie's job is literally just: log a formatted string. that's it. that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

first, you gotta bring the header in like it's a plus-one:

#include <ecoli/log.h>

and then the actual queen herself:

int int ec_vlog(
    int                type,    /* The log type identifier. */
    enum ec_log_level  level,   /* The log level. */
    const char        *format,  /* The format string. */
    va_list            ap       /* The list of arguments. */
);
ngl the source literally writes int int up there and I am not touching it, not my business, not my problem πŸ™ˆ copy it exactly as-is or the compiler will humble you.

so like, quick tour of the squad:

  • type β€” the log type identifier. which flavor of log are we doing.
  • level β€” the log level. how loud are we being about it.
  • format β€” the format string. the template, the blueprint, the vision ✨
  • ap β€” the list of arguments. all the little pieces getting slotted into that format.

πŸ’œ STRUCTURES πŸ’œ

here's enum ec_log_level, the mood ring of logging. lowest to highest panic, in order, no cap:

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 iconic, all doing their own thing πŸ‘‘


πŸ”₯ RETURN VALUE πŸ”₯

  • 0 on success β€” we ate, no crumbs 🫢
  • -1 on error, and errno is set β€” it's giving "something went wrong and we're telling you why" 😭

🌈 SEE ALSO 🌈

the whole friend group, go say hi:


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


okay that's the whole page, mwah πŸ’– this was libecoli, dated 2026-06-11, and the man page answers to EC_VLOG(3). go log something gorgeous, bestie πŸ¦‹βœ¨

πŸ“¦ where this page comes from