Elements 6.3.3
A C++ base framework for the Euclid Software.
Loading...
Searching...
No Matches
Logging.tpp
Go to the documentation of this file.
1
20
21// IWYU pragma: private, include "ElementsKernel/Logging.h"
22
23#ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_LOGGING_IMPL_
24#error "This file should not be included directly! Use ElementsKernel/Logging.h instead"
25#else
26
27#include <utility> // for forward
28
29#include <log4cpp/Priority.hh> // for Priority
30
31namespace Elements {
32
33template <typename... Args>
34void Logging::debug(const char* stringFormat, Args&&... args) {
35 m_log4cppLogger.debug(stringFormat, std::forward<Args>(args)...);
36}
37
38template <typename... Args>
39void Logging::info(const char* stringFormat, Args&&... args) {
40 m_log4cppLogger.info(stringFormat, std::forward<Args>(args)...);
41}
42
43template <typename... Args>
44void Logging::warn(const char* stringFormat, Args&&... args) {
45 m_log4cppLogger.warn(stringFormat, std::forward<Args>(args)...);
46}
47
48template <typename... Args>
49void Logging::error(const char* stringFormat, Args&&... args) {
50 m_log4cppLogger.error(stringFormat, std::forward<Args>(args)...);
51}
52
53template <typename... Args>
54void Logging::fatal(const char* stringFormat, Args&&... args) {
55 m_log4cppLogger.fatal(stringFormat, std::forward<Args>(args)...);
56}
57
58template <typename... Args>
59void Logging::log(log4cpp::Priority::Value level, const char* stringFormat, Args&&... args) {
60 m_log4cppLogger.log(level, stringFormat, std::forward<Args>(args)...);
61}
62
63template <typename T>
65 m_message << m;
66 return *this;
67}
68
69} // namespace Elements
70
71#endif // ELEMENTSKERNEL_ELEMENTSKERNEL_LOGGING_IMPL_
A helper class for logging messages using the "<<" operator.
Definition Logging.h:275
LogMessageStream & operator<<(const T &m)
LogMessageStream fatal()
Definition Logging.cpp:145
LogMessageStream error()
Definition Logging.cpp:137
LogMessageStream debug()
Definition Logging.cpp:114
log4cpp::Category & m_log4cppLogger
Definition Logging.h:263
void log(log4cpp::Priority::Value level, const std::string &logMessage)
Definition Logging.cpp:149
LogMessageStream info()
Definition Logging.cpp:122
LogMessageStream warn()
Definition Logging.cpp:130
T forward(T... args)