Skip to content

Commit 2c94ac0

Browse files
committed
libeventlog: use common header for ANSI colors
Problem: libeventlog/formatter.c defines ANSI color terminal escapes but they are now defined in a common header. Use ansi_color.h.
1 parent c8f609a commit 2c94ac0

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/common/libeventlog/formatter.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,11 @@
2323
#include "ccan/str/str.h"
2424
#include "src/common/libutil/errprintf.h"
2525
#include "src/common/libutil/timestamp.h"
26+
#include "src/common/libutil/ansi_color.h"
2627

2728
#include "eventlog.h"
2829
#include "formatter.h"
2930

30-
#define ANSI_COLOR_RED "\x1b[31m"
31-
#define ANSI_COLOR_GREEN "\x1b[32m"
32-
#define ANSI_COLOR_YELLOW "\x1b[33m"
33-
#define ANSI_COLOR_BLUE "\x1b[34m"
34-
#define ANSI_COLOR_MAGENTA "\x1b[35m"
35-
#define ANSI_COLOR_CYAN "\x1b[36m"
36-
#define ANSI_COLOR_GRAY "\x1b[37m"
37-
38-
#define ANSI_COLOR_RESET "\x1b[0m"
39-
#define ANSI_COLOR_BOLD "\x1b[1m"
40-
#define ANSI_COLOR_HALFBRIGHT "\x1b[2m"
41-
#define ANSI_COLOR_REVERSE "\x1b[7m"
42-
43-
#define ANSI_COLOR_RESET "\x1b[0m"
44-
4531
enum {
4632
EVENTLOG_COLOR_NAME,
4733
EVENTLOG_COLOR_TIME,

0 commit comments

Comments
 (0)