aboutsummaryrefslogtreecommitdiff
path: root/src/log_colored.h
blob: c7c0014eb42b0b995d0c3bdb14dcb7c695bc71c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef POTD_LOG_COLORED
#define POTD_LOG_COLORED 1

#include "log.h"

/* ANSI terminal color codes */
#define RESET "\x1B[0m"
#define GRN   "\x1B[32;1m"
#define YEL   "\x1B[33;1m"
#define RED   "\x1B[31;1;5m"
/* LOG_SET_FUNCS comfort */
#define LOG_COLORED_FUNCS log_open_colored, log_close_colored, \
    log_fmt_colored, log_fmtex_colored


int log_open_colored(void);

void log_close_colored(void);

void log_fmt_colored(log_priority prio, const char *fmt, ...);

void log_fmtex_colored(log_priority prio, const char *srcfile,
                       size_t line, const char *fmt, ...);

#endif