#include <stdio.h>
#include <stdarg.h>
#include <stdbool.h>
#include <time.h>
Go to the source code of this file.
|
#define | LOG_VERSION "x.x.x modified" |
|
#define | LOG_MAX_CALLBACKS 32 |
|
#define | log_trace(...) log_log(LOG_TRACE, __FILE__, __LINE__, __VA_ARGS__) |
|
#define | log_debug(...) log_log(LOG_DEBUG, __FILE__, __LINE__, __VA_ARGS__) |
|
#define | log_info(...) log_log(LOG_INFO, __FILE__, __LINE__, __VA_ARGS__) |
|
#define | log_warn(...) log_log(LOG_WARN, __FILE__, __LINE__, __VA_ARGS__) |
|
#define | log_error(...) log_log(LOG_ERROR, __FILE__, __LINE__, __VA_ARGS__) |
|
#define | log_fatal(...) log_log(LOG_FATAL, __FILE__, __LINE__, __VA_ARGS__) |
|
#define | log_set_lock(fn, udata) _log_set_lock(&L, fn, udata); |
|
#define | log_set_level(level) _log_set_level(&L, level); |
|
#define | log_set_quiet(enable) _log_set_quiet(&L, enable) |
|
#define | log_add_callback(fn, udata, level) _log_add_callback(&L, fn, udata, level) |
|
#define | log_add_fp(fn, level) _log_add_fp(&L, fn, level) |
|
#define | log_log(level, file, line, ...) _log_log(&L, level, file, line, __VA_ARGS__) |
|
|
const char * | log_level_string (int level) |
|
void | _log_set_lock (log_Logger *L, log_LockFn fn, void *udata) |
|
void | _log_set_level (log_Logger *L, int level) |
|
void | _log_set_quiet (log_Logger *L, bool enable) |
|
int | _log_add_callback (log_Logger *L, log_LogFn fn, void *udata, int level) |
|
int | _log_add_fp (log_Logger *L, FILE *fp, int level) |
|
void | _log_log (log_Logger *L, int level, const char *file, int line, const char *fmt,...) |
|
◆ LOG_VERSION
#define LOG_VERSION "x.x.x modified" |
Copyright (c) 2020 rxi
This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See log.c
for details.
◆ log_trace
◆ log_debug
◆ log_info
- Examples
- audit-log.c, ban.c, channel.c, components.c, embed.c, emoji.c, guild-template.c, guild.c, invite.c, manual-dm.c, pin.c, reaction.c, slash-commands.c, and slash-commands2.c.
◆ log_warn
◆ log_error
◆ log_fatal
◆ log_set_lock
◆ log_set_level
◆ log_set_quiet
◆ log_add_callback
◆ log_add_fp
◆ log_log
#define log_log |
( |
|
level, |
|
|
|
file, |
|
|
|
line, |
|
|
|
... |
|
) |
| _log_log(&L, level, file, line, __VA_ARGS__) |
◆ log_level_string()
const char * log_level_string |
( |
int |
level | ) |
|
◆ _log_set_lock()
◆ _log_set_level()
◆ _log_set_quiet()
void _log_set_quiet |
( |
log_Logger * |
L, |
|
|
bool |
enable |
|
) |
| |
◆ _log_add_callback()
◆ _log_add_fp()
int _log_add_fp |
( |
log_Logger * |
L, |
|
|
FILE * |
fp, |
|
|
int |
level |
|
) |
| |
◆ _log_log()
void _log_log |
( |
log_Logger * |
L, |
|
|
int |
level, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ level_strings
const char* level_strings[] |
|
extern |
◆ level_colors
const char* level_colors[] |
|
extern |