better errno reporting

This commit is contained in:
Eliot Horowitz
2010-02-04 10:59:13 -05:00
parent 57c0843f76
commit f7901fdc2c
3 changed files with 13 additions and 2 deletions

View File

@@ -175,5 +175,14 @@ namespace mongo {
void rotateLogs( int signal ){
loggingManager.rotate();
}
string errnostring( const char * prefix ){
stringstream ss;
if ( prefix )
ss << prefix << ": ";
ss << OUTPUT_ERRNO;
return ss.str();
}
}