Logging.h File Reference

Detailed Description

#include "waLBerlaDefinitions.h"
#include "core/DataTypes.h"
#include "core/logging/CMakeDefs.h"
#include "core/mpi/MPIManager.h"
#include "core/singleton/Singleton.h"
#include "core/timing/WcPolicy.h"
#include "core/Regex.h"
#include "core/StringUtility.h"
#include <functional>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>

Classes

class  walberla::logging::Logging
 
class  walberla::logging::Logging::CustomStamp
 
class  walberla::logging::internal::LoggingMacroDispatcher
 

Namespaces

 walberla
 Storage for detected contacts which can be used to perform actions for all contacts, e.g.
 
 walberla::logging
 
 walberla::logging::internal
 

Macros

#define WALBERLA_LOG_DEVEL_SECTION()   if( walberla::logging::Logging::instance()->logDevel ( __FILE__, __LINE__ ) )
 
#define WALBERLA_LOG_DEVEL_ON_ROOT_SECTION()   if( walberla::logging::Logging::instance()->onRoot() && walberla::logging::Logging::instance()->logDevel ( __FILE__, __LINE__ ) )
 
#define WALBERLA_LOG_RESULT_SECTION()   if( walberla::logging::Logging::instance()->logResult ( __FILE__, __LINE__ ) )
 
#define WALBERLA_LOG_RESULT_ON_ROOT_SECTION()   if( walberla::logging::Logging::instance()->onRoot() && walberla::logging::Logging::instance()->logResult ( __FILE__, __LINE__ ) )
 
#define WALBERLA_LOG_WARNING_SECTION()   if( walberla::logging::Logging::instance()->logWarning ( __FILE__, __LINE__ ) )
 
#define WALBERLA_LOG_WARNING_ON_ROOT_SECTION()   if( walberla::logging::Logging::instance()->onRoot() && walberla::logging::Logging::instance()->logWarning ( __FILE__, __LINE__ ) )
 
#define WALBERLA_LOG_INFO_SECTION()   if( false )
 
#define WALBERLA_LOG_INFO_ON_ROOT_SECTION()   if( false )
 
#define WALBERLA_LOG_PROGRESS_SECTION()   if( false )
 
#define WALBERLA_LOG_PROGRESS_ON_ROOT_SECTION()   if( false )
 
#define WALBERLA_LOG_DETAIL_SECTION()   if( false )
 
#define WALBERLA_LOG_DETAIL_ON_ROOT_SECTION()   if( false )
 
#define WALBERLA_LOG_DEVEL(msg)
 
#define WALBERLA_LOG_DEVEL_ON_ROOT(msg)
 
#define WALBERLA_LOG_DEVEL_VAR(variable)
 
#define WALBERLA_LOG_DEVEL_VAR_ON_ROOT(variable)
 
#define WALBERLA_LOG_RESULT(msg)
 
#define WALBERLA_LOG_RESULT_ON_ROOT(msg)
 
#define WALBERLA_LOG_WARNING(msg)
 
#define WALBERLA_LOG_WARNING_ON_ROOT(msg)
 
#define WALBERLA_LOG_INFO(msg)   (void(0))
 
#define WALBERLA_LOG_INFO_ON_ROOT(msg)   (void(0))
 
#define WALBERLA_LOG_PROGRESS(msg)   (void(0))
 
#define WALBERLA_LOG_PROGRESS_ON_ROOT(msg)   (void(0))
 
#define WALBERLA_LOG_DETAIL(msg)   (void(0))
 
#define WALBERLA_LOG_DETAIL_ON_ROOT(msg)   (void(0))
 

Macro Definition Documentation

#define WALBERLA_LOG_DETAIL (   msg)    (void(0))
#define WALBERLA_LOG_DETAIL_ON_ROOT (   msg)    (void(0))
#define WALBERLA_LOG_DETAIL_ON_ROOT_SECTION ( )    if( false )
#define WALBERLA_LOG_DETAIL_SECTION ( )    if( false )
#define WALBERLA_LOG_DEVEL (   msg)
Value:
{\
std::stringstream WALBERLA__LOGGING__OSS;\
WALBERLA__LOGGING__OSS << msg;\
walberla::logging::internal::LoggingMacroDispatcher::logDevel( WALBERLA__LOGGING__OSS.str(), __FILE__, __LINE__ );\
}\
}
static void logDevel(const std::string &message, const std::string &callerPath, const int line)
Definition: Logging.h:553
#define WALBERLA_LOG_DEVEL_SECTION()
Definition: Logging.h:512
#define WALBERLA_LOG_DEVEL_ON_ROOT (   msg)
Value:
{\
if( walberla::logging::Logging::instance()->onRoot() ){\
std::stringstream WALBERLA__LOGGING__OSS;\
WALBERLA__LOGGING__OSS << msg;\
walberla::logging::internal::LoggingMacroDispatcher::logDevel( WALBERLA__LOGGING__OSS.str(), __FILE__, __LINE__ );\
}}\
}
static void logDevel(const std::string &message, const std::string &callerPath, const int line)
Definition: Logging.h:553
#define WALBERLA_LOG_DEVEL_SECTION()
Definition: Logging.h:512
#define WALBERLA_LOG_DEVEL_ON_ROOT_SECTION ( )    if( walberla::logging::Logging::instance()->onRoot() && walberla::logging::Logging::instance()->logDevel ( __FILE__, __LINE__ ) )
#define WALBERLA_LOG_DEVEL_SECTION ( )    if( walberla::logging::Logging::instance()->logDevel ( __FILE__, __LINE__ ) )
#define WALBERLA_LOG_DEVEL_VAR (   variable)
Value:
{\
std::stringstream WALBERLA__LOGGING__OSS;\
WALBERLA__LOGGING__OSS << #variable " = " << variable;\
walberla::logging::internal::LoggingMacroDispatcher::logDevel( WALBERLA__LOGGING__OSS.str(), __FILE__, __LINE__ );\
}\
}
static void logDevel(const std::string &message, const std::string &callerPath, const int line)
Definition: Logging.h:553
#define WALBERLA_LOG_DEVEL_SECTION()
Definition: Logging.h:512
#define WALBERLA_LOG_DEVEL_VAR_ON_ROOT (   variable)
Value:
{\
if( walberla::logging::Logging::instance()->onRoot() ){\
std::stringstream WALBERLA__LOGGING__OSS;\
WALBERLA__LOGGING__OSS << #variable " = " << variable;\
walberla::logging::internal::LoggingMacroDispatcher::logDevel( WALBERLA__LOGGING__OSS.str(), __FILE__, __LINE__ );\
}}\
}
static void logDevel(const std::string &message, const std::string &callerPath, const int line)
Definition: Logging.h:553
#define WALBERLA_LOG_DEVEL_SECTION()
Definition: Logging.h:512
#define WALBERLA_LOG_INFO (   msg)    (void(0))
#define WALBERLA_LOG_INFO_ON_ROOT (   msg)    (void(0))
#define WALBERLA_LOG_INFO_ON_ROOT_SECTION ( )    if( false )
#define WALBERLA_LOG_INFO_SECTION ( )    if( false )
#define WALBERLA_LOG_PROGRESS (   msg)    (void(0))
#define WALBERLA_LOG_PROGRESS_ON_ROOT (   msg)    (void(0))
#define WALBERLA_LOG_PROGRESS_ON_ROOT_SECTION ( )    if( false )
#define WALBERLA_LOG_PROGRESS_SECTION ( )    if( false )
#define WALBERLA_LOG_RESULT (   msg)
Value:
{\
std::stringstream WALBERLA__LOGGING__OSS;\
WALBERLA__LOGGING__OSS << msg;\
walberla::logging::internal::LoggingMacroDispatcher::logResult( WALBERLA__LOGGING__OSS.str(), __FILE__, __LINE__ );\
}\
}
#define WALBERLA_LOG_RESULT_SECTION()
Definition: Logging.h:515
static void logResult(const std::string &message, const std::string &callerPath, const int line)
Definition: Logging.h:557
#define WALBERLA_LOG_RESULT_ON_ROOT (   msg)
Value:
{\
if( walberla::logging::Logging::instance()->onRoot() ){\
std::stringstream WALBERLA__LOGGING__OSS;\
WALBERLA__LOGGING__OSS << msg;\
walberla::logging::internal::LoggingMacroDispatcher::logResult( WALBERLA__LOGGING__OSS.str(), __FILE__, __LINE__ );\
}}\
}
#define WALBERLA_LOG_RESULT_SECTION()
Definition: Logging.h:515
static void logResult(const std::string &message, const std::string &callerPath, const int line)
Definition: Logging.h:557
#define WALBERLA_LOG_RESULT_ON_ROOT_SECTION ( )    if( walberla::logging::Logging::instance()->onRoot() && walberla::logging::Logging::instance()->logResult ( __FILE__, __LINE__ ) )
#define WALBERLA_LOG_RESULT_SECTION ( )    if( walberla::logging::Logging::instance()->logResult ( __FILE__, __LINE__ ) )
#define WALBERLA_LOG_WARNING (   msg)
Value:
{\
std::stringstream WALBERLA__LOGGING__OSS;\
WALBERLA__LOGGING__OSS << msg;\
walberla::logging::internal::LoggingMacroDispatcher::logWarning( WALBERLA__LOGGING__OSS.str(), __FILE__, __LINE__ );\
}\
}
static void logWarning(const std::string &message, const std::string &callerPath, const int line)
Definition: Logging.h:561
#define WALBERLA_LOG_WARNING_SECTION()
Definition: Logging.h:518
#define WALBERLA_LOG_WARNING_ON_ROOT (   msg)
Value:
{\
if( walberla::logging::Logging::instance()->onRoot() ){\
std::stringstream WALBERLA__LOGGING__OSS;\
WALBERLA__LOGGING__OSS << msg;\
walberla::logging::internal::LoggingMacroDispatcher::logWarning( WALBERLA__LOGGING__OSS.str(), __FILE__, __LINE__ );\
}}\
}
static void logWarning(const std::string &message, const std::string &callerPath, const int line)
Definition: Logging.h:561
#define WALBERLA_LOG_WARNING_SECTION()
Definition: Logging.h:518
#define WALBERLA_LOG_WARNING_ON_ROOT_SECTION ( )    if( walberla::logging::Logging::instance()->onRoot() && walberla::logging::Logging::instance()->logWarning ( __FILE__, __LINE__ ) )
#define WALBERLA_LOG_WARNING_SECTION ( )    if( walberla::logging::Logging::instance()->logWarning ( __FILE__, __LINE__ ) )