cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
log.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_LOG_LOG_H
4#define pRC_CORE_LOG_LOG_H
5
6#include <cstdlib>
7
8#include <prc/config.hpp>
9#include <prc/core/log/io.hpp>
10
11namespace pRC::Logging
12{
13 template<class... Xs>
14 [[noreturn]] static inline void error(Xs &&...args)
15 {
16 log<LogLevel::Error, true>("Error:", forward<Xs>(args)...);
17 std::abort();
18 }
19
20 template<class... Xs>
21 static inline void warning(Xs &&...args)
22 {
23 return log<LogLevel::Warning>("Warning:", forward<Xs>(args)...);
24 }
25
26 template<class... Xs>
27 static inline void info(Xs &&...args)
28 {
29 return log<LogLevel::Info>("Info:", forward<Xs>(args)...);
30 }
31
32 template<class... Xs>
33 static inline void debug(Xs &&...args)
34 {
35 return log<LogLevel::Debug>("Debug:", forward<Xs>(args)...);
36 }
37
38 template<class... Xs>
39 static inline void trace(Xs &&...args)
40 {
41 return log<LogLevel::Trace>("Trace:", forward<Xs>(args)...);
42 }
43}
44#endif // pRC_CORE_LOG_LOG_H
Definition io.hpp:13
static void info(Xs &&...args)
Definition log.hpp:27
static void log(X &&arg, Xs &&...args)
Definition io.hpp:17
static void debug(Xs &&...args)
Definition log.hpp:33
static void trace(Xs &&...args)
Definition log.hpp:39
static void warning(Xs &&...args)
Definition log.hpp:21
static void error(Xs &&...args)
Definition log.hpp:14