📄 msgout.h
字号:
#if !defined(MSGOUT_H)#define MSGOUT_H//#define DEBUG 1#if defined(DEBUG)#define dbg_out(fmt,arg...) do{ \ fprintf(stderr, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ syslog(LOG_INFO|LOG_USER, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ fflush(stderr); \ }while(0)#else#define dbg_out(fmt,arg...) do{ \ if (hostinfo_refer_debug_state()){ \ fprintf(stderr, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ syslog(LOG_INFO|LOG_USER, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ fflush(stderr); \ } \ }while(0) #endif#define war_out(fmt,arg...) do{ \ fprintf(stderr, "Warning : [file:%s line:%d ] " fmt,__FILE__,__LINE__,##arg); \ fflush(stderr); \ syslog(LOG_WARNING|LOG_USER, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ }while(0)#define err_out(fmt,arg...) do{ \ fprintf(stderr, "Error : [file:%s line:%d ] " fmt,__FILE__,__LINE__,##arg); \ fflush(stderr); \ syslog(LOG_ERR|LOG_USER, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ }while(0)#define _assert(cond) do{ \ if (!(cond)) { \ fprintf(stderr, "Assertion : [file:%s line:%d ]\n",__FILE__,__LINE__); \ fflush(stderr); \ abort(); \ } \ }while(0)#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -