EC_LOG_DEFAULT_CB(3)

NAME
ec_log_default_cb - Default log handler.

SYNOPSIS
#include <ecoli/log.h>

int ec_log_default_cb(
    int                type,    /* The log type identifier. */
    enum ec_log_level  level,   /* The log level. */
    void              *opaque,  /* Unused. */
    const char        *str      /* The string to be logged. */
);

DESCRIPTION

This is the default log function that is used by the library. By default, it prints all logs whose level is WARNING or more critical. This level can be changed with ec_log_level_set().

STRUCTURES

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

RETURN VALUE

0 on success, -1 on error (errno is set).

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_type_register(3)

COPYRIGHT

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