log.cpp
来自「LINUX 线程池源代码:Lock.cpp : 锁的操作 , 读锁可以」· C++ 代码 · 共 30 行
CPP
30 行
#include "Log.h"void debug_output(const char *fmt , ...){/* time_t ti; ti = time(NULL); char times[65535]; snprintf(times , sizeof(times) , "%s" , ctime(&ti)); times[strlen(times)-1] = ' '; strncat(times , "----------- " , 9); */ va_list ap; char buff[65535]; va_start(ap , fmt); vsnprintf(buff , sizeof(buff) , fmt , ap); std::cout<<buff; //strncat(times , buff , strlen(buff)); //fwrite(times , sizeof(char) , strlen(times) , pt); //fwrite("\n" , 1 , 1 , pt); //fflush(pt); va_end(ap);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?