Server Logging Rules¶
- cout/cerr should never be used
- Include log.h to use the LOG() helper macro
Debugging with levels of verbosity. See the -v command line option (default level is 0). If the global log level is less than x, no functions in the stream are executed.
LOG( int x ) << ...
log() << ...
- recoverable, e.g. replica set node down
warning() << ...
- unexpected system state (disk full)
- internal code errors
error() << ...