Changeset 2208
- Timestamp:
- 03/08/2008 07:56:16 (5 months ago)
- Location:
- box/trunk/lib/common
- Files:
-
- 2 modified
-
Logging.cpp (modified) (4 diffs)
-
Logging.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/common/Logging.cpp
r2204 r2208 228 228 bool Console::sShowTimeMicros = false; 229 229 bool Console::sShowTag = false; 230 #ifndef WIN32231 230 bool Console::sShowPID = false; 232 #endif233 231 std::string Console::sTag; 234 232 … … 249 247 } 250 248 251 #ifndef WIN32252 249 void Console::SetShowPID(bool enabled) 253 250 { 254 251 sShowPID = enabled; 255 252 } 256 #endif257 253 258 254 bool Console::Log(Log::Level level, const std::string& rFile, … … 281 277 if (sShowTag) 282 278 { 283 #ifndef WIN32284 279 if (sShowPID) 285 280 { … … 287 282 } 288 283 else 289 #endif290 284 { 291 285 buf << "[" << sTag << "] "; 292 286 } 293 287 } 294 #ifndef WIN32295 288 else if (sShowPID) 296 289 { 297 290 buf << "[" << getpid() << "] "; 298 291 } 299 #endif300 292 301 293 if (level <= Log::FATAL) -
box/trunk/lib/common/Logging.h
r2199 r2208 148 148 static bool sShowTag; 149 149 static std::string sTag; 150 #ifndef WIN32151 150 static bool sShowPID; 152 #endif153 151 154 152 public: … … 161 159 static void SetShowTime(bool enabled); 162 160 static void SetShowTimeMicros(bool enabled); 163 #ifndef WIN32164 161 static void SetShowPID(bool enabled); 165 #endif166 162 }; 167 163
