logger.h
来自「a open source project in linux for peer 」· C头文件 代码 · 共 33 行
H
33 行
#ifndef LOGGER_H_#define LOGGER_H_#include <string>#include <iostream>#include <fstream>/** * Utility class for logging. * The methods should be self-explainatory. * * It writes the output to the standard output * and to a logfile called "sip2p.log". */ class Logger{ public: Logger(const std::string& senderName); virtual ~Logger(); void debug(const std::string& msg); void debug(const std::string& msg, int number); void debug(const char * msg); void debug(const char * msg, int number); void debug(int i); private: std::string name; static std::ofstream outFile; };#endif /*LOGGER_H_*/
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?