diff options
author | dwight <dwight@Dwights-MacBook-2.local> | 2009-02-18 09:45:49 -0500 |
---|---|---|
committer | dwight <dwight@Dwights-MacBook-2.local> | 2009-02-18 09:45:49 -0500 |
commit | 90f39126fc9438f7b8d161b14de1879d788197ec (patch) | |
tree | 9c394106853250a474282c4ceab5edc49e6bebfc /util | |
parent | 9bd71ee2400bec4f49ce9e16873d172f404c3444 (diff) | |
download | mongo-90f39126fc9438f7b8d161b14de1879d788197ec.tar.gz |
log more on commands
Diffstat (limited to 'util')
-rw-r--r-- | util/log.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/log.h b/util/log.h index 0746749d5cf..692eab2cf7e 100644 --- a/util/log.h +++ b/util/log.h @@ -136,6 +136,13 @@ namespace mongo { return logstream; } + /* flush the log stream if the log level is + at the specified level or higher. */ + inline void logflush(int level = 0) { + if( level > logLevel ) + logstream.flush(); + } + inline Nullstream& log( int level = 0 ){ if ( level > logLevel ) return nullstream; |