preCICE v3.1.1
Loading...
Searching...
No Matches
LogConfiguration.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5
6namespace precice {
7namespace logging {
8
31
34
37
39void setupLogging(std::string const &logConfigFile = "log.conf");
40
42void setupLogging(LoggingConfiguration configs, bool enabled = true);
43
46void setMPIRank(int const rank);
47
51
54void lockConf();
55
59 int rank{-1};
60 bool locked{false};
61};
62
64GlobalLoggingConfig &getGlobalLoggingConfig();
65
66} // namespace logging
67} // namespace precice
std::string name
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.
Main namespace of the precice library.
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.