source: molecuilder/src/log.hpp@ a71ad8

Last change on this file since a71ad8 was 12f57b, checked in by Frederik Heber <heber@…>, 15 years ago

Log() and eLog() are prepended by a DoLog()/DoeLog() construct.

  • Most of the run time (95%) is spent on verbosity that it is discarded anyway due to a low verbosity setting. However, the operator << is evaluated from the right-hand side, hence the whole message is constructed and then thrown away.
  • DoLog() and DoeLog() are new functions that check the verbosity beforehand and are used as follows: DoLog(2) && (Log() << verbose(2) << "message" << endl);

Signed-off-by: Frederik Heber <heber@…>

  • Property mode set to 100644
File size: 323 bytes
Line 
1/*
2 * log.hpp
3 *
4 * Created on: Oct 19, 2009
5 * Author: metzler
6 */
7
8#ifndef LOG_HPP_
9#define LOG_HPP_
10
11#include "errorlogger.hpp"
12#include "logger.hpp"
13
14class logger * Log();
15class errorLogger * eLog();
16void setVerbosity(int verbosityLevel);
17bool DoLog(int verbose);
18bool DoeLog(int verbose);
19
20#endif /* LOG_HPP_ */
Note: See TracBrowser for help on using the repository browser.