EC_LOG_LEVEL_SET(3)

✨ EC_LOG_LEVEL_SET(3) ✨

okay bestie, welcome to the libecoli programmer's manual πŸ’– this one lives in section 3 and it's literally called ec_log_level_set. yes we're doing logs today, stay with me 🫢


🌸 NAME 🌸

ec_log_level_set β€” set the global log level πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ecoli/log.h>

int ec_log_level_set(
    enum ec_log_level  level   /* The log level to be set. */
);

no cap, that's the whole vibe. you hand it a level, it does the thing ✨


πŸŽ€ DESCRIPTION πŸŽ€

so like, this level you're setting? it's the one the default log handler actually listens to, and that handler is ec_log_default_cb(). 🫢

the rule is simple, bestie: every message that is at least as critical as the default level gets displayed. anything chiller than that? not shown. periodt. πŸ’…


πŸ’œ STRUCTURES πŸ’œ

here's the enum you're working with, iconic lineup honestly πŸ‘‘

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;
};

look at them, in order, most dramatic to most chatty πŸŽ€ EC_LOG_EMERG at the top, EC_LOG_DEBUG at the bottom, slay 🌈


⭐ RETURN VALUE ⭐

  • 0 on success πŸ₯³
  • -1 on error 😭

🌈 SEE ALSO 🌈

go read those too, iykyk πŸ“šβœ¨


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


k bye bestie, this page is from libecoli and it's dated 2026-06-11 β€” that's the whole manual page, no crumbs left, fr fr πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from