forked from jeremy-rifkin/cpptrace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogging.hpp
More file actions
39 lines (32 loc) · 1001 Bytes
/
logging.hpp
File metadata and controls
39 lines (32 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef LOGGING_HPP
#define LOGGING_HPP
#include <cpptrace/utils.hpp>
#include "utils/microfmt.hpp"
CPPTRACE_BEGIN_NAMESPACE
namespace detail {
namespace log {
// exported for test purposes
CPPTRACE_EXPORT void error(const char*);
template<typename... Args>
void error(const char* format, Args&&... args) {
error(microfmt::format(format, args...).c_str());
}
CPPTRACE_EXPORT void warn(const char*);
template<typename... Args>
void warn(const char* format, Args&&... args) {
warn(microfmt::format(format, args...).c_str());
}
CPPTRACE_EXPORT void info(const char*);
template<typename... Args>
void info(const char* format, Args&&... args) {
info(microfmt::format(format, args...).c_str());
}
CPPTRACE_EXPORT void debug(const char*);
template<typename... Args>
void debug(const char* format, Args&&... args) {
debug(microfmt::format(format, args...).c_str());
}
}
}
CPPTRACE_END_NAMESPACE
#endif