preCICE v3.1.2
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions
precice::logging Namespace Reference

contains the logging framework. More...

Namespaces

namespace  keywords
 

Classes

struct  BackendConfiguration
 Holds the configuration for one logging backend (sink) and takes care of default values. More...
 
class  colorized_severity_formatter_factory
 A custom formatter that handles the colorized Severity formatting. More...
 
struct  GlobalLoggingConfig
 Holds global logging data in a central place. More...
 
class  Logger
 This class provides a lightweight logger. More...
 
struct  LogLocation
 Struct used to capture the original location of a log request. More...
 
class  NullSink
 A custom sink that does nothing. It is used to disable the default sink of boost.Log. More...
 
class  precice_feature
 A feature that adds LogLocation info to log attributes. More...
 
struct  precice_log
 Required by BoostLogger to use precice_feature. More...
 
class  severity_formatter_factory
 A custom formatter that handles non-colorized Severity formatting. More...
 
class  StreamBackend
 A simple backends that outputs the message to a stream. More...
 
class  timestamp_formatter_factory
 A custom formatter that handles the TimeStamp format string. More...
 
class  Tracer
 

Typedefs

using LoggingConfiguration = std::vector<BackendConfiguration>
 Holds the configuration of the logging system.
 
template<class BaseLogger >
using BoostLogger
 The boost logger that combines required featrues.
 

Functions

LoggingConfiguration readLogConfFile (std::string const &filename)
 Reads a log file, returns a logging configuration.
 
void setupLogging (LoggingConfiguration configs, bool enabled=true)
 Configures the logging from a LoggingConfiguration.
 
void setupLogging (std::string const &logConfigFile="log.conf")
 Configures the logging from a log file.
 
void setMPIRank (int const rank)
 
void setParticipant (std::string const &participant)
 
GlobalLoggingConfiggetGlobalLoggingConfig ()
 Returns the global logging configuration.
 
void lockConf ()
 

Detailed Description

contains the logging framework.

Typedef Documentation

◆ BoostLogger

template<class BaseLogger >
using precice::logging::BoostLogger
Initial value:
boost::log::sources::basic_composite_logger<
char,
BaseLogger,
boost::log::sources::single_thread_model,
boost::log::sources::features<
boost::log::sources::severity<boost::log::trivial::severity_level>,
precice_log>>

The boost logger that combines required featrues.

Definition at line 89 of file Logger.cpp.

◆ LoggingConfiguration

Holds the configuration of the logging system.

Definition at line 33 of file LogConfiguration.hpp.

Function Documentation

◆ getGlobalLoggingConfig()

GlobalLoggingConfig & precice::logging::getGlobalLoggingConfig ( )

Returns the global logging configuration.

Definition at line 294 of file LogConfiguration.cpp.

◆ lockConf()

void precice::logging::lockConf ( )

Locks the configuration, ignoring any future calls to setupLogging()

See also
GlobalLoggingConfig

Definition at line 300 of file LogConfiguration.cpp.

Here is the call graph for this function:

◆ readLogConfFile()

LoggingConfiguration precice::logging::readLogConfFile ( std::string const & filename)

Reads a log file, returns a logging configuration.

Reads a log configuration file, returns vector of BackEndConfiguration.

Definition at line 125 of file LogConfiguration.cpp.

Here is the call graph for this function:

◆ setMPIRank()

void precice::logging::setMPIRank ( int const rank)

Sets the current MPI rank as a logging attribute

See also
GlobalLoggingConfig

Definition at line 284 of file LogConfiguration.cpp.

Here is the call graph for this function:

◆ setParticipant()

void precice::logging::setParticipant ( std::string const & name)

Sets the name of the current participant as a logging attribute

See also
GlobalLoggingConfig

Definition at line 289 of file LogConfiguration.cpp.

Here is the call graph for this function:

◆ setupLogging() [1/2]

void precice::logging::setupLogging ( LoggingConfiguration configs,
bool enabled )

Configures the logging from a LoggingConfiguration.

Definition at line 194 of file LogConfiguration.cpp.

Here is the call graph for this function:

◆ setupLogging() [2/2]

void precice::logging::setupLogging ( std::string const & logConfigFile)

Configures the logging from a log file.

Definition at line 279 of file LogConfiguration.cpp.

Here is the call graph for this function: