#ifndef _LOG_MYLOG_H_ #define _LOG_MYLOG_H_ #include #include #include #include #include #include #include #include #include //#include"aes.h" #include #include #include #include #include #include //for socket ofcourse #include #include //for exit(0); #include //For errno - the error number #include //Provides declarations for tcp header #include #include //Provides declarations for ip header #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define RED "\x1B[31m" #define GRN "\x1B[32m" #define YEL "\x1B[33m" #define BLU "\x1B[34m" #define MAG "\x1B[35m" #define CYN "\x1B[36m" #define WHT "\x1B[37m" #define RESET "\x1B[0m" const int log_fatal=0; const int log_error=1; const int log_warn=2; const int log_info=3; const int log_debug=4; const int log_trace=5; #define log(...) log0(__FILE__,__FUNCTION__,__LINE__,__VA_ARGS__) void log0(const char * file,const char * function,int line,int level,const char* str, ...); #endif