Ignore:
Timestamp:
01/08/2007 00:18:50 (5 years ago)
Author:
chris
Message:

Replace almost all calls to syslog() with logging framework. (merges [1783])

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/chris/general/lib/server/ServerStream.h

    r1603 r1784  
    1515 
    1616#ifndef WIN32 
    17         #include <syslog.h> 
    1817        #include <sys/wait.h> 
    1918#endif 
     
    7473                        if(childExit) 
    7574                        { 
    76                                 ::syslog(LOG_ERR, "in server child, exception %s (%d/%d) -- terminating child", e.what(), e.GetType(), e.GetSubType()); 
     75                                BOX_ERROR("Error in child process, " 
     76                                        "terminating connection: exception " << 
     77                                        e.what() << "(" << e.GetType() << 
     78                                        "/" << e.GetSubType() << ")"); 
    7779                                _exit(1); 
    7880                        } 
     
    8385                        if(childExit) 
    8486                        { 
    85                                 ::syslog(LOG_ERR, "in server child, exception %s -- terminating child", e.what()); 
     87                                BOX_ERROR("Error in child process, " 
     88                                        "terminating connection: exception " << 
     89                                        e.what()); 
    8690                                _exit(1); 
    8791                        } 
     
    9296                        if(childExit) 
    9397                        { 
    94                                 ::syslog(LOG_ERR, "in server child, unknown exception -- terminating child"); 
     98                                BOX_ERROR("Error in child process, " 
     99                                        "terminating connection: " 
     100                                        "unknown exception"); 
    95101                                _exit(1); 
    96102                        } 
     
    267273                                                         
    268274                                                        // Log it 
    269                                                         ::syslog(LOG_INFO, "%s (handling in child %d)", logMessage.c_str(), pid); 
     275                                                        BOX_WARNING("Error message from child process " << pid << ": " << logMessage); 
    270276                                                } 
    271277                                                else 
Note: See TracChangeset for help on using the changeset viewer.