Loading...
Searching...
No Matches
log.h
Go to the documentation of this file.
/* SPDX-License-Identifier: Zlib */
#ifndef GIRARA_LOG_H
#define GIRARA_LOG_H
#include <glib.h>
#include <stdarg.h>
#include "macros.h"
typedef enum girara_log_level_e {
GIRARA_DEBUG,
GIRARA_INFO,
GIRARA_WARNING,
GIRARA_ERROR
} girara_log_level_t;
#define girara_debug(...) girara_log(G_STRLOC, __func__, GIRARA_DEBUG, __VA_ARGS__)
#define girara_info(...) girara_log(G_STRLOC, __func__, GIRARA_INFO, __VA_ARGS__)
#define girara_warning(...) girara_log(G_STRLOC, __func__, GIRARA_WARNING, __VA_ARGS__)
#define girara_error(...) girara_log(G_STRLOC, __func__, GIRARA_ERROR, __VA_ARGS__)
void girara_log(const char* location, const char* function, girara_log_level_t level, const char* format, ...)
GIRARA_PRINTF(4, 5) GIRARA_VISIBLE;
void girara_vlog(const char* location, const char* function, girara_log_level_t level, const char* format,
va_list ap) GIRARA_VISIBLE;
girara_log_level_t girara_get_log_level(void) GIRARA_VISIBLE;
void girara_set_log_level(girara_log_level_t level) GIRARA_VISIBLE;
#endif
girara_set_log_level
void girara_set_log_level(girara_log_level_t level) GIRARA_VISIBLE
girara_log
void girara_log(const char *location, const char *function, girara_log_level_t level, const char *format,...) GIRARA_PRINTF(4
girara_vlog
void girara_vlog(const char *location, const char *function, girara_log_level_t level, const char *format, va_list ap) GIRARA_VISIBLE
girara_get_log_level
girara_log_level_t girara_get_log_level(void) GIRARA_VISIBLE
girara_log_level_t
girara_log_level_t
Definition log.h:14
GIRARA_ERROR
@ GIRARA_ERROR
Definition log.h:18
GIRARA_DEBUG
@ GIRARA_DEBUG
Definition log.h:15
GIRARA_WARNING
@ GIRARA_WARNING
Definition log.h:17
GIRARA_INFO
@ GIRARA_INFO
Definition log.h:16
macros.h
GIRARA_PRINTF
#define GIRARA_PRINTF(format_idx, arg_idx)
Definition macros.h:24
GIRARA_VISIBLE
#define GIRARA_VISIBLE
Definition macros.h:52