preCICE v3.2.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LogConfiguration.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
6namespace precice::logging {
7
30
33
36
38void setupLogging(std::string const &logConfigFile = "log.conf");
39
41void setupLogging(LoggingConfiguration configs, bool enabled = true);
42
45void setMPIRank(int const rank);
46
50
53void lockConf();
54
58 int rank{-1};
59 bool locked{false};
60};
61
63GlobalLoggingConfig &getGlobalLoggingConfig();
64
65} // namespace precice::logging
std::string name
contains the logging framework.
void setupLogging(LoggingConfiguration configs, bool enabled)
Configures the logging from a LoggingConfiguration.
void setMPIRank(int const rank)
void setParticipant(std::string const &participant)
LoggingConfiguration readLogConfFile(std::string const &filename)
Reads a log file, returns a logging configuration.
GlobalLoggingConfig & getGlobalLoggingConfig()
Returns the global logging configuration.
Holds the configuration for one logging backend (sink) and takes care of default values.
void setEnabled(bool enabled)
Sets weather the sink is enabled or disabled.
void setOption(std::string key, std::string value)
Sets on option, overwrites default values.
static bool isValidOption(std::string key)
Checks if an option is usable.
Holds global logging data in a central place.