Changeset 2092
- Timestamp:
- 22/02/2008 00:43:16 (11 months ago)
- Location:
- box/trunk/lib
- Files:
-
- 3 modified
-
common/Logging.cpp (modified) (4 diffs)
-
common/Logging.h (modified) (2 diffs)
-
server/Daemon.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/common/Logging.cpp
r2081 r2092 183 183 bool Console::sShowTimeMicros = false; 184 184 bool Console::sShowTag = false; 185 #ifndef WIN32 185 186 bool Console::sShowPID = false; 187 #endif 186 188 std::string Console::sTag; 187 189 … … 202 204 } 203 205 206 #ifndef WIN32 204 207 void Console::SetShowPID(bool enabled) 205 208 { 206 209 sShowPID = enabled; 207 210 } 211 #endif 208 212 209 213 bool Console::Log(Log::Level level, const std::string& rFile, … … 259 263 if (sShowTag) 260 264 { 265 #ifndef WIN32 261 266 if (sShowPID) 262 267 { … … 264 269 } 265 270 else 271 #endif 266 272 { 267 273 buf << "[" << sTag << "] "; 268 274 } 269 275 } 276 #ifndef WIN32 270 277 else if (sShowPID) 271 278 { 272 279 buf << "[" << getpid() << "] "; 273 280 } 281 #endif 274 282 275 283 if (level <= Log::FATAL) -
box/trunk/lib/common/Logging.h
r2081 r2092 122 122 static bool sShowTag; 123 123 static std::string sTag; 124 #ifndef WIN32 124 125 static bool sShowPID; 126 #endif 125 127 126 128 public: … … 133 135 static void SetShowTime(bool enabled); 134 136 static void SetShowTimeMicros(bool enabled); 137 #ifndef WIN32 135 138 static void SetShowPID(bool enabled); 139 #endif 136 140 }; 137 141 -
box/trunk/lib/server/Daemon.cpp
r2081 r2092 105 105 return "c:" 106 106 #ifndef WIN32 107 "DFk "107 "DFkP" 108 108 #endif 109 "h PqvVt:TU";109 "hqvVt:TU"; 110 110 } 111 111 … … 125 125 " -F Do not fork into background, but fork to serve multiple clients\n" 126 126 " -k Keep console open after fork, keep writing log messages to it\n" 127 " -P Show process ID (PID) in console output\n" 127 128 #endif 128 " -P Show process ID (PID) in console output\n"129 129 " -q Run more quietly, reduce verbosity level by one, can repeat\n" 130 130 " -v Run more verbosely, increase verbosity level by one, can repeat\n" … … 184 184 break; 185 185 186 #ifndef WIN32 186 187 case 'P': 187 188 { … … 189 190 } 190 191 break; 192 #endif 191 193 192 194 case 'q':
