0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

LOG macros so can use LOG(1) instead of log(1)

This commit is contained in:
Eliot Horowitz 2010-09-17 13:34:43 -04:00
parent 684f67d21f
commit 8847592479
3 changed files with 9 additions and 0 deletions

View File

@ -50,6 +50,9 @@
#define RARELY MONGO_RARELY
#define ONCE MONGO_ONCE
// util/log.h
#define LOG MONGO_LOG
#undef MONGO_MACROS_CLEANED
#endif

View File

@ -54,5 +54,8 @@
#undef RARELY
#undef ONCE
// util/log.h
#undef LOG
#define MONGO_MACROS_CLEANED
#endif

View File

@ -298,6 +298,9 @@ namespace mongo {
return Logstream::get().prolog();
}
#define MONGO_LOG(level) if ( logLevel >= (level) ) log( level )
#define LOG MONGO_LOG
inline Nullstream& log( LogLevel l ) {
return Logstream::get().prolog().setLogLevel( l );
}