-
Notifications
You must be signed in to change notification settings - Fork 17
/
log.h
28 lines (21 loc) · 734 Bytes
/
log.h
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
26
27
28
#include "gptpcmn.h"
#ifndef GPTP_LOG_H
#define GPTP_LOG_H
#define GPTP_LOG_DEST_CONSOLE 0
#define GPTP_LOG_DEST_SYSLOG 1
#define GPTP_LOG_ERROR LOG_ERR
#define GPTP_LOG_WARNING LOG_WARNING
#define GPTP_LOG_NOTICE LOG_NOTICE
#define GPTP_LOG_INFO LOG_INFO
#define GPTP_LOG_DEBUG LOG_DEBUG
#define GPTP_LOG_COLOR_ERROR "\x1b[31;1m"
#define GPTP_LOG_COLOR_WARNING "\x1b[35;1m"
#define GPTP_LOG_COLOR_NOTICE "\x1b[34;1m"
#define GPTP_LOG_COLOR_INFO "\x1b[33;1m"
#define GPTP_LOG_COLOR_DEBUG "\x1b[30;1m"
#define GPTP_LOG_COLOR_RESET "\x1b[0m"
#define GPTP_LOG_LVL_DEFAULT GPTP_LOG_NOTICE
void gPTP_openLog(int dest, int logLvl);
void gPTP_logMsg(int prio, char* format, ...);
void gPTP_closeLog(void);
#endif