| 1 | /* | 
|---|
| 2 | * Project: MoleCuilder | 
|---|
| 3 | * Description: creates and alters molecular systems | 
|---|
| 4 | * Copyright (C)  2010 University of Bonn. All rights reserved. | 
|---|
| 5 | * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. | 
|---|
| 6 | */ | 
|---|
| 7 |  | 
|---|
| 8 | /* | 
|---|
| 9 | * LogStub.cpp | 
|---|
| 10 | * | 
|---|
| 11 | *  Created on: Apr 06, 2011 | 
|---|
| 12 | *      Author: heber | 
|---|
| 13 | */ | 
|---|
| 14 |  | 
|---|
| 15 | // include config.h | 
|---|
| 16 | #ifdef HAVE_CONFIG_H | 
|---|
| 17 | #include <config.h> | 
|---|
| 18 | #endif | 
|---|
| 19 |  | 
|---|
| 20 | #include "MemDebug.hpp" | 
|---|
| 21 |  | 
|---|
| 22 | #include "logger.hpp" | 
|---|
| 23 | #include "errorlogger.hpp" | 
|---|
| 24 |  | 
|---|
| 25 | /** | 
|---|
| 26 | * Sets verbosity for the error logger and the standard logger. | 
|---|
| 27 | * | 
|---|
| 28 | * \param int verbosity level | 
|---|
| 29 | */ | 
|---|
| 30 | void setVerbosity(int verbosityLevel) | 
|---|
| 31 | {} | 
|---|
| 32 |  | 
|---|
| 33 | /** | 
|---|
| 34 | * Gets verbosity for the error logger and the standard logger. | 
|---|
| 35 | * | 
|---|
| 36 | * \param int verbosity level | 
|---|
| 37 | */ | 
|---|
| 38 | int getVerbosity() | 
|---|
| 39 | { | 
|---|
| 40 | return 0; | 
|---|
| 41 | } | 
|---|
| 42 |  | 
|---|
| 43 | /** | 
|---|
| 44 | * Prints a log entry. | 
|---|
| 45 | * | 
|---|
| 46 | * \param indentation level of the message to log | 
|---|
| 47 | */ | 
|---|
| 48 | class logger& Log() | 
|---|
| 49 | { | 
|---|
| 50 | return logger::getInstance(); | 
|---|
| 51 | } | 
|---|
| 52 |  | 
|---|
| 53 | /** Checks verbosity for logger. | 
|---|
| 54 | * Is supposed to be used in construct as this: | 
|---|
| 55 | * DoLog(2) && (Log() << Verbose(2) << "message." << endl); | 
|---|
| 56 | * If DoLog does not return true, the right-hand side is not evaluated and we save some time. | 
|---|
| 57 | * \param verbose verbosity level of this message | 
|---|
| 58 | * \return true - print, false - don't | 
|---|
| 59 | */ | 
|---|
| 60 | bool DoLog(int verbose) | 
|---|
| 61 | { | 
|---|
| 62 | return true; | 
|---|
| 63 | } | 
|---|
| 64 |  | 
|---|
| 65 | /** Checks verbosity for errorlogger. | 
|---|
| 66 | * Is supposed to be used in construct as this: | 
|---|
| 67 | * DoLog(2) && (Log() << Verbose(2) << "message." << endl); | 
|---|
| 68 | * If DoLog does not return true, the right-hand side is not evaluated and we save some time. | 
|---|
| 69 | * \param verbose verbosity level of this message | 
|---|
| 70 | * \return true - print, false - don't | 
|---|
| 71 | */ | 
|---|
| 72 | bool DoeLog(int verbose) | 
|---|
| 73 | { | 
|---|
| 74 | return false; | 
|---|
| 75 | } | 
|---|
| 76 |  | 
|---|
| 77 | /** | 
|---|
| 78 | * Prints an error log entry. | 
|---|
| 79 | * | 
|---|
| 80 | * \param indentation level of the message to log | 
|---|
| 81 | */ | 
|---|
| 82 | class errorLogger & eLog() | 
|---|
| 83 | { | 
|---|
| 84 | return errorLogger::getInstance(); | 
|---|
| 85 | } | 
|---|