27 #include <sys/resource.h>
38 if (0 == getrusage(RUSAGE_SELF, &usage))
39 return usage.ru_maxrss / mbsize;
69 #define BLACK "\033[30m"
70 #define RED "\033[31m"
71 #define GREEN "\033[32m" //\033[7;30m" bkg
72 #define YELLOW "\033[33m"
73 #define BLUE "\033[34m"
74 #define MAGENTA "\033[35m"
75 #define CYAN "\033[36m"
76 #define WHITE "\033[37m"
77 #define BOLDBLACK "\033[1m\033[30m"
78 #define BOLDRED "\033[1m\033[31m"
79 #define BOLDGREEN "\033[1m\033[32m"
80 #define BOLDYELLOW "\033[1m\033[33m"
81 #define BOLDBLUE "\033[1m\033[34m"
82 #define BOLDMAGENTA "\033[1m\033[35m"
83 #define BOLDCYAN "\033[1m\033[36m"
84 #define BOLDWHITE "\033[1m\033[37m"
86 #define CLEAR "\033[2J" // clear screen escape code
106 string s =
"[Warning] ";
114 string s =
"[Debug Thread] ";
128 string s =
"[Debug] ";
134 null.setstate(std::ios_base::failbit);
140 string s =
"[Info] ";
143 string s =
"[Info] ";
149 null.setstate(std::ios_base::failbit);
155 string s =
"[Info] ";
161 null.setstate(std::ios_base::failbit);
168 string s =
"[REMARK] ";
171 null.setstate(std::ios_base::failbit);
177 if (m_vlevel < vlevel)
179 string s =
"[Verbose][";
186 null.setstate(std::ios_base::failbit);
191 LogStreamer JetScapeLogger::VerboseShower(
unsigned short m_vlevel) {
192 if (m_vlevel < vlevel)
194 string s =
"[Verbose][";
201 null.setstate(std::ios_base::failbit);
207 if (m_vlevel < vlevel)
209 string s =
"[Verbose][";
214 null.setstate(std::ios_base::failbit);
220 if (m_vlevel < vlevel)
222 string s =
"[Verbose][";
227 null.setstate(std::ios_base::failbit);