@@ -82,13 +82,13 @@ const string OUT::reset = "\033[0m";
8282#ifndef VLOG_FUNC_START
8383 #define VLOG_FUNC_START (scope ) \
8484 pfasst::log::stack_position++; \
85- VLOG (9 ) << std::string((pfasst::log::stack_position - 1 ) * 2, ' ') << "START:" << std::string(scope) + "::" + std::string(__func__) + "() "
85+ VLOG (9 ) << std::string((pfasst::log::stack_position - 1 ) * 2, ' ') << "START: " << std::string(scope) << "::" << std::string(__func__) << "()"
8686#endif
8787
8888#ifndef VLOG_FUNC_END
8989 #define VLOG_FUNC_END (scope ) \
9090 pfasst::log::stack_position--; \
91- VLOG (9 ) << std::string(pfasst::log::stack_position * 2 , ' ' ) << "DONE: " << std::string(scope) + "::" + std::string(__func__) + "()";
91+ VLOG (9 ) << std::string(pfasst::log::stack_position * 2 , ' ' ) << "DONE: " << std::string(scope) << "::" << std::string(__func__) << "()";
9292#endif
9393
9494#ifndef LOG_PRECISION
@@ -100,6 +100,21 @@ const string OUT::reset = "\033[0m";
100100
101101namespace pfasst
102102{
103+ /* *
104+ * Logging Facilities for PFASST++
105+ *
106+ * As PFASST++ is using easylogging++ as the logging backend, there are six distinced logging levels plus ten
107+ * additional verbose logging levels.
108+ *
109+ * To achieve consistent logging throughout PFASST++ and its examples, we agree on the following conventions for using
110+ * the different levels:
111+ *
112+ * - `INFO` is used for general important messages to the user
113+ * - `DEBUG` is ment for developping purposes and is only active when compiled without `-DNDEBUG`
114+ * - `VLOG` - the verbose logging levels are used as follows:
115+ * - 0 to 8
116+ * - 9 for function enter and exit messages (\see VLOG_FUNC_START and \see VLOG_FUNC_END )
117+ */
103118 namespace log
104119 {
105120 static size_t stack_position;
@@ -149,24 +164,20 @@ namespace pfasst
149164 *
150165 * Current defaults are:
151166 *
152- * - NewLineForContainer
153167 * - LogDetailedCrashReason
154168 * - DisableApplicationAbortOnFatalLog
155169 * - ColoredTerminalOutput
156170 * - MultiLoggerSupport
157- * - AutoSpacing
158171 *
159172 * \see https://github.com/easylogging/easyloggingpp#logging-flags
160173 */
161174 inline static void set_logging_flags ()
162175 {
163- // el::Loggers::addFlag(el::LoggingFlag::NewLineForContainer);
164176 el::Loggers::addFlag (el::LoggingFlag::LogDetailedCrashReason);
165177 el::Loggers::addFlag (el::LoggingFlag::DisableApplicationAbortOnFatalLog);
166178 el::Loggers::addFlag (el::LoggingFlag::ColoredTerminalOutput);
167179 el::Loggers::addFlag (el::LoggingFlag::MultiLoggerSupport);
168180 el::Loggers::addFlag (el::LoggingFlag::CreateLoggerAutomatically);
169- el::Loggers::addFlag (el::LoggingFlag::AutoSpacing);
170181 }
171182
172183#ifdef NDEBUG
@@ -182,7 +193,7 @@ namespace pfasst
182193 LOG (FATAL) << " fatal error" ;
183194 LOG (TRACE) << " trace" ;
184195 for (size_t level = 0 ; level <= 9 ; ++level) {
185- VLOG (level) << " verbose level" << level;
196+ VLOG (level) << " verbosity level " << level;
186197 }
187198 cout << " ### End Example Logging Levels" << endl << endl;
188199 }
0 commit comments