ALE的骚操作

1、if (LOGS_WITH_TIMESTAMP())

static bool_t __logs_with_timestamp = FALSE;
#define LOGS_WITH_TIMESTAMP() __logs_with_timestamp

这样的话,虽然是宏定义,但是却可以改动

2、char * 都支持 +=,醉了

3、FILE * newlogs = freopen("./log.txt","a",fp);

setlinebuf(newlogs);

以/n为准,往log里写CR;

3、#define sem_get(id,timeout) _sem_get (__FILE__, __LINE__, id, timeout)

这样写,就是要把这两个宏加进去。这样syslog的时候方便,棒棒哒

猜你喜欢

转载自blog.csdn.net/qq_24328911/article/details/81067986