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
29
#ifndef _FLOG_H
#define _FLOG_H
#include <clog/clog.h>
#include <iostream>
static std::string TAG = "";
class Log {
public:
static void enable() { clog_enable(); }
static void disable() { clog_disable(); }
static void i(std::string msg, std::string tag = TAG) {
clog_i(tag.c_str(), msg.c_str());
}
static void e(std::string msg, std::string tag = TAG) {
clog_e(tag.c_str(), msg.c_str());
}
static void w(std::string msg, std::string tag = TAG) {
clog_w(tag.c_str(), msg.c_str());
}
static void f(std::string msg, std::string tag = TAG) {
clog_f(tag.c_str(), msg.c_str());
}
static void p(std::string msg, std::string tag = TAG) {
clog_e(tag.c_str(), msg.c_str());
}
static void v(std::string msg, std::string tag = TAG) {
clog_v(tag.c_str(), msg.c_str());
}
};
#endif