#include"simple_log.h"intmain() {
int ret = log_init("conf", "simple_log.conf");
if (ret != 0) {
printf("log_init error!\n");
return1;
}
LOG_INFO("%s", "this is a info log");
return0;
}
build && test
make && make test && ./output/bin/simple_log_test
输出
2014-10-25 15:43:29.216 INFO test/simple_log_test.cpp(5): this is a info log