Changeset 2092

Show
Ignore:
Timestamp:
22/02/2008 00:43:16 (11 months ago)
Author:
chris
Message:

Disable -P option and showing PID in Logging on Windows.

Location:
box/trunk/lib
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/common/Logging.cpp

    r2081 r2092  
    183183bool Console::sShowTimeMicros = false; 
    184184bool Console::sShowTag = false; 
     185#ifndef WIN32 
    185186bool Console::sShowPID = false; 
     187#endif 
    186188std::string Console::sTag; 
    187189 
     
    202204} 
    203205 
     206#ifndef WIN32 
    204207void Console::SetShowPID(bool enabled) 
    205208{ 
    206209        sShowPID = enabled; 
    207210} 
     211#endif 
    208212 
    209213bool Console::Log(Log::Level level, const std::string& rFile,  
     
    259263        if (sShowTag) 
    260264        { 
     265                #ifndef WIN32 
    261266                if (sShowPID) 
    262267                { 
     
    264269                } 
    265270                else 
     271                #endif 
    266272                { 
    267273                        buf << "[" << sTag << "] "; 
    268274                } 
    269275        } 
     276        #ifndef WIN32 
    270277        else if (sShowPID) 
    271278        { 
    272279                buf << "[" << getpid() << "] "; 
    273280        } 
     281        #endif 
    274282 
    275283        if (level <= Log::FATAL) 
  • box/trunk/lib/common/Logging.h

    r2081 r2092  
    122122        static bool sShowTag; 
    123123        static std::string sTag; 
     124        #ifndef WIN32 
    124125        static bool sShowPID; 
     126        #endif 
    125127 
    126128        public: 
     
    133135        static void SetShowTime(bool enabled); 
    134136        static void SetShowTimeMicros(bool enabled); 
     137        #ifndef WIN32 
    135138        static void SetShowPID(bool enabled); 
     139        #endif 
    136140}; 
    137141 
  • box/trunk/lib/server/Daemon.cpp

    r2081 r2092  
    105105        return "c:" 
    106106        #ifndef WIN32 
    107                 "DFk" 
     107                "DFkP" 
    108108        #endif 
    109                 "hPqvVt:TU"; 
     109                "hqvVt:TU"; 
    110110} 
    111111 
     
    125125        "  -F         Do not fork into background, but fork to serve multiple clients\n" 
    126126        "  -k         Keep console open after fork, keep writing log messages to it\n" 
     127        "  -P         Show process ID (PID) in console output\n" 
    127128#endif 
    128         "  -P         Show process ID (PID) in console output\n" 
    129129        "  -q         Run more quietly, reduce verbosity level by one, can repeat\n" 
    130130        "  -v         Run more verbosely, increase verbosity level by one, can repeat\n" 
     
    184184                break; 
    185185 
     186                #ifndef WIN32 
    186187                case 'P': 
    187188                { 
     
    189190                } 
    190191                break; 
     192                #endif 
    191193 
    192194                case 'q':