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:
parent
684f67d21f
commit
8847592479
@ -50,6 +50,9 @@
|
||||
#define RARELY MONGO_RARELY
|
||||
#define ONCE MONGO_ONCE
|
||||
|
||||
// util/log.h
|
||||
#define LOG MONGO_LOG
|
||||
|
||||
#undef MONGO_MACROS_CLEANED
|
||||
#endif
|
||||
|
||||
|
@ -54,5 +54,8 @@
|
||||
#undef RARELY
|
||||
#undef ONCE
|
||||
|
||||
// util/log.h
|
||||
#undef LOG
|
||||
|
||||
#define MONGO_MACROS_CLEANED
|
||||
#endif
|
||||
|
@ -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 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user