BioDynaMo
v1.05.120-25dc9790
|
Go to the documentation of this file.
15 #ifndef CORE_UTIL_LOG_H_
16 #define CORE_UTIL_LOG_H_
39 template <
typename... Args>
40 static void Debug(
const std::string& location,
const Args&... parts) {
42 if (gErrorIgnoreLevel <= kPrint) {
43 std::string message =
Concat(parts...);
45 fprintf(stderr,
"Debug in <%s>: %s\n", location.c_str(), message.c_str());
54 template <
typename... Args>
55 static void Info(
const std::string& location,
const Args&... parts) {
56 std::string message =
Concat(parts...);
58 ::Info(location.c_str(),
"%s", message.c_str());
66 template <
typename... Args>
67 static void Warning(
const std::string& location,
const Args&... parts) {
68 std::string message =
Concat(parts...);
70 ::Warning(location.c_str(),
"%s", message.c_str());
78 template <
typename... Args>
79 static void Error(
const std::string& location,
const Args&... parts) {
80 std::string message =
Concat(parts...);
82 ::Error(location.c_str(),
"%s", message.c_str());
90 template <
typename... Args>
91 static void Break(
const std::string& location,
const Args&... parts) {
92 std::string message =
Concat(parts...);
94 ::Break(location.c_str(),
"%s", message.c_str());
102 template <
typename... Args>
103 static void SysError(
const std::string& location,
const Args&... parts) {
104 std::string message =
Concat(parts...);
106 ::SysError(location.c_str(),
"%s", message.c_str());
114 template <
typename... Args>
115 static void Fatal(
const std::string& location,
const Args&... parts) {
116 std::string message =
Concat(parts...);
118 ::Error(location.c_str(),
"%s", message.c_str());
123 template <
typename... Args>
124 static void Condition(
const std::function<
bool()>& lambda,
125 const Args&... parts) {
128 std::string message =
Concat(parts...);
130 fprintf(stdout,
"%s\n", message.c_str());
136 #endif // CORE_UTIL_LOG_H_
static void SysError(const std::string &location, const Args &... parts)
Prints system error message.
static void Warning(const std::string &location, const Args &... parts)
Prints warning message.
static void Info(const std::string &location, const Args &... parts)
Prints information message.
std::string Concat(const Args &... parts)
Concatenates all arguments into a string. Equivalent to streaming all arguments into a stringstream a...
static void Debug(const std::string &location, const Args &... parts)
Prints debug message.
static void Fatal(const std::string &location, const Args &... parts)
Prints fatal error message.
static void Error(const std::string &location, const Args &... parts)
Prints error message.
static void Condition(const std::function< bool()> &lambda, const Args &... parts)
static void Break(const std::string &location, const Args &... parts)
Prints break message.
Wrapper class over ROOT logging module.