로딩중...
검색중...
일치하는것 없음
when.hpp
이 파일의 문서화 페이지로 가기
1
2#pragma once
3
4#include "clog/richLog.hpp"
5
6namespace by {
7
8#undef __WHEN_OBJECT__
9#define __WHEN_OBJECT__ __clog_when__
10
16 class _nout __WHEN_OBJECT__: public __indep_when__ {
17 BY(ME(__WHEN_OBJECT__))
18
19 public:
20 static const me& get();
21
22 template <typename... Ts> const me& err(const nchar* fmt, const Ts&... args) const {
23 ::by::richLog(::by::errLv::ERR, __FILENAME__, __func__, __LINE__, (std::string(fmt) + "\n").c_str(),
24 args...);
25 return *this;
26 }
27
28 template <typename... Ts> const me& warn(const nchar* fmt, const Ts&... args) const {
29 ::by::richLog(::by::errLv::WARN, __FILENAME__, __func__, __LINE__, (std::string(fmt) + "\n").c_str(),
30 args...);
31 return *this;
32 }
33
34 template <typename... Ts> const me& info(const nchar* fmt, const Ts&... args) const {
35 ::by::richLog(::by::errLv::INFO, __FILENAME__, __func__, __LINE__, (std::string(fmt) + "\n").c_str(),
36 args...);
37 return *this;
38 }
39
40 template <typename... Ts> const me& dbgErr(const nchar* fmt, const Ts&... args) const {
41 ::by::dbgRichLog(::by::errLv::ERR, __FILENAME__, __func__, __LINE__, (std::string(fmt) + "\n").c_str(),
42 args...);
43 return *this;
44 }
45
46 template <typename... Ts> const me& dbgWarn(const nchar* fmt, const Ts&... args) const {
47 ::by::dbgRichLog(::by::errLv::WARN, __FILENAME__, __func__, __LINE__, (std::string(fmt) + "\n").c_str(),
48 args...);
49 return *this;
50 }
51
52 template <typename... Ts> const me& dbgInfo(const nchar* fmt, const Ts&... args) const {
53 ::by::dbgRichLog(::by::errLv::INFO, __FILENAME__, __func__, __LINE__, (std::string(fmt) + "\n").c_str(),
54 args...);
55 return *this;
56 }
57 };
58} // namespace by
Conditional logging utility for clog module
Definition when.hpp:16
Function or object evaluation arguments
Definition args.hpp:22
Standard error implementation
Definition err.hpp:12
Rich logging support with polymorphic type conversion
Definition richLog.hpp:34