| | 148 | |
| | 149 | === Use the logger, not cout/cerr === #code-good-bad-logger |
| | 150 | |
| | 151 | __Don't use__ '''std::cout''' or '''std::cerr''' (except maybe for internal tests which never make it into a commit). |
| | 152 | |
| | 153 | __Always use__ |
| | 154 | {{{ |
| | 155 | #include "CodePatterns/Log.hpp" |
| | 156 | |
| | 157 | ... |
| | 158 | LOG(1, "INFO: Variable bla contains " << bla << "."); |
| | 159 | ... |
| | 160 | ELOG(1, "Variable is " << bla << " which is invalid!"); |
| | 161 | ... |
| | 162 | }}} |
| | 163 | |
| | 164 | This way we can control the verbosity of the code easily and we do not end up with many commented-out wasteland alike ''... //std::cout << "Variable bla is " << ...''. |