|
Last change
on this file since 7fff6c was 7fff6c, checked in by Frederik Heber <heber@…>, 15 years ago |
|
Default Assert behavior is Abort, not Ask. Added LOG() macro.
- Library version is now 4:0:3, API version is still 1.0.8.
- default behavior of Abort is more approriate, e.g. for unit tests are much
more abundant that main (interactive) programs.
- added ELOG(), LOG() macro in place for DoLog(x) && (Log() << Verbose ...
|
-
Property mode
set to
100644
|
|
File size:
609 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 config.h
|
|---|
| 12 | #ifdef HAVE_CONFIG_H
|
|---|
| 13 | #include <config.h>
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 | #include "errorlogger.hpp"
|
|---|
| 17 | #include "logger.hpp"
|
|---|
| 18 | #include "Verbose.hpp"
|
|---|
| 19 |
|
|---|
| 20 | #define LOG(level,msg) DoLog(level) && (Log() << Verbose(level) << msg << std::endl)
|
|---|
| 21 | #define ELOG(level,msg) DoeLog(level) && (eLog() << Verbose(level) << msg << std::endl)
|
|---|
| 22 |
|
|---|
| 23 | class logger & Log();
|
|---|
| 24 | class errorLogger & eLog();
|
|---|
| 25 | void setVerbosity(int verbosityLevel);
|
|---|
| 26 | int getVerbosity();
|
|---|
| 27 | bool DoLog(int verbose);
|
|---|
| 28 | bool DoeLog(int verbose);
|
|---|
| 29 |
|
|---|
| 30 | #endif /* LOG_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.