File: Log.cpp

package info (click to toggle)
abyss 2.3.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,476 kB
  • sloc: cpp: 169,166; ansic: 6,828; java: 2,239; makefile: 2,229; sh: 1,159; perl: 672; haskell: 412; python: 72
file content (19 lines) | stat: -rw-r--r-- 356 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "Log.h"
#include "Common/Options.h"
#include <iostream>

using namespace std;

/** Print a log message if the verbosity level is at least the
 * specified level.
 */
ostream& logger(int level)
{
	if (opt::verbose < level) {
		static ostream bitBucket(NULL);
		return bitBucket;
	}
	if (opt::rank >= 0)
		cout << opt::rank << ": ";
	return cout;
}