source: src/logger.hpp@ 8931ef

Last change on this file since 8931ef was a80f419, checked in by Frederik Heber <heber@…>, 15 years ago

First version.

Everything was extracted from project MoleCuilder and adapted such that it
runs on its own (i.e. new configure.ac, Makefile.am structure, stuff for
libtool versioning, ...)

  • Property mode set to 100644
File size: 779 bytes
Line 
1/*
2 * logger.hpp
3 *
4 * Created on: Oct 19, 2009
5 * Author: metzler
6 */
7
8#ifndef LOGGER_HPP_
9#define LOGGER_HPP_
10
11#include <iosfwd>
12
13#include "Patterns/Singleton.hpp"
14
15using namespace std;
16
17class Verbose;
18
19class logger : public Singleton<logger> {
20 friend class Singleton<logger>;
21public :
22 static ostream *nix;
23 static int verbosity;
24
25 static bool DoOutput();
26 static void setVerbosity(int verbosityLevel);
27 static int getVerbosity();
28
29protected:
30 /** Do not call this constructor directly, use getInstance() instead. */
31 logger();
32 /** Do not call this destructor directly, use purgeInstance() instead. */
33 ~logger();
34};
35
36ostream& operator<<(class logger&l, const Verbose& ost);
37ostream& operator<<(class logger*l, const Verbose& ost);
38
39#endif /* LOGGER_HPP_ */
Note: See TracBrowser for help on using the repository browser.