|
@@ -77,6 +77,35 @@ public:
|
|
|
void error(const std::string &msg);
|
|
|
void fatal(const std::string &msg);
|
|
|
#endif
|
|
|
+
|
|
|
+#if __cpp_lib_format >= 202106L // C++20 + P2508
|
|
|
+ template<class... Args>
|
|
|
+ void format(severity_t s,
|
|
|
+ std::format_string<Args...> fmt, Args&&... args);
|
|
|
+
|
|
|
+ template<class Arg1, class... Args>
|
|
|
+ void trace(
|
|
|
+ std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args);
|
|
|
+ template<class Arg1, class... Args>
|
|
|
+ void debug(
|
|
|
+ std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args);
|
|
|
+ template<class Arg1, class... Args>
|
|
|
+ void info(
|
|
|
+ std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args);
|
|
|
+ template<class Arg1, class... Args>
|
|
|
+ void notice(
|
|
|
+ std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args);
|
|
|
+ template<class Arg1, class... Args>
|
|
|
+ void warning(
|
|
|
+ std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args);
|
|
|
+ template<class Arg1, class... Args>
|
|
|
+ void error(
|
|
|
+ std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args);
|
|
|
+ template<class Arg1, class... Args>
|
|
|
+ void fatal(
|
|
|
+ std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args);
|
|
|
+#endif
|
|
|
+
|
|
|
record trace();
|
|
|
record debug();
|
|
|
record info();
|
|
@@ -323,6 +352,34 @@ C++98. Начиная с C++11 это просто синоним <tt>severity</
|
|
|
</synopsis>
|
|
|
|
|
|
<synopsis>
|
|
|
+<prototype><![CDATA[template<class... Args>
|
|
|
+void format(severity_t s,
|
|
|
+ std::format_string<Args...> fmt, Args&&... args)]]> <sign>C++20</sign></prototype>
|
|
|
+<p>Форматирует сообщение используя указанную строку формата и аргументы
|
|
|
+(подобно <tt>std::format</tt>), затем выводит его с заданным приоритетом.</p>
|
|
|
+</synopsis>
|
|
|
+
|
|
|
+<synopsis>
|
|
|
+<prototype><![CDATA[template<class Arg1, class... Args>
|
|
|
+void trace(std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args)]]> <sign>C++20</sign></prototype>
|
|
|
+<prototype><![CDATA[template<class Arg1, class... Args>
|
|
|
+void debug(std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args)]]> <sign>C++20</sign></prototype>
|
|
|
+<prototype><![CDATA[template<class Arg1, class... Args>
|
|
|
+void info(std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args)]]> <sign>C++20</sign></prototype>
|
|
|
+<prototype><![CDATA[template<class Arg1, class... Args>
|
|
|
+void notice(std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args)]]> <sign>C++20</sign></prototype>
|
|
|
+<prototype><![CDATA[template<class Arg1, class... Args>
|
|
|
+void warning(std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args)]]> <sign>C++20</sign></prototype>
|
|
|
+<prototype><![CDATA[template<class Arg1, class... Args>
|
|
|
+void error(std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args)]]> <sign>C++20</sign></prototype>
|
|
|
+<prototype><![CDATA[template<class Arg1, class... Args>
|
|
|
+void fatal(std::format_string<Arg1,Args...> fmt, Arg1 &&arg1, Args&&... args)]]> <sign>C++20</sign></prototype>
|
|
|
+<p>Форматирует сообщение используя указанную строку формата и аргументы
|
|
|
+(подобно <tt>std::format</tt>), затем выводит его с соответствующим
|
|
|
+приоритетом.</p>
|
|
|
+</synopsis>
|
|
|
+
|
|
|
+<synopsis>
|
|
|
<prototype>logger::record trace()</prototype>
|
|
|
<prototype>logger::record debug()</prototype>
|
|
|
<prototype>logger::record info()</prototype>
|