66#pragma once
77
88#include " cflog/cflog.hpp"
9+ #include " cflog/cflog_export.h"
910#include < format>
1011#include < source_location>
1112#include < string_view>
1213
1314namespace cf ::log {
1415
15- void trace (std::string_view msg, std::string_view tag = " CFLog" ,
16- std::source_location loc = std::source_location::current());
16+ CFLOG_API void trace (std::string_view msg, std::string_view tag = " CFLog" ,
17+ std::source_location loc = std::source_location::current());
1718
18- void debug (std::string_view msg, std::string_view tag = " CFLog" ,
19- std::source_location loc = std::source_location::current());
19+ CFLOG_API void debug (std::string_view msg, std::string_view tag = " CFLog" ,
20+ std::source_location loc = std::source_location::current());
2021
21- void info (std::string_view msg, std::string_view tag = " CFLog" ,
22- std::source_location loc = std::source_location::current());
22+ CFLOG_API void info (std::string_view msg, std::string_view tag = " CFLog" ,
23+ std::source_location loc = std::source_location::current());
2324
24- void warning (std::string_view msg, std::string_view tag = " CFLog" ,
25- std::source_location loc = std::source_location::current());
25+ CFLOG_API void warning (std::string_view msg, std::string_view tag = " CFLog" ,
26+ std::source_location loc = std::source_location::current());
2627
27- void error (std::string_view msg, std::string_view tag = " CFLog" ,
28- std::source_location loc = std::source_location::current());
28+ CFLOG_API void error (std::string_view msg, std::string_view tag = " CFLog" ,
29+ std::source_location loc = std::source_location::current());
2930
3031// ============================================================================
3132// Formatted logging functions (std::format style)
@@ -203,8 +204,8 @@ template <typename... Args> struct traceftag {
203204 detail::log_helper<level::TRACE , Args...>{tag, fmt, std::forward<Args>(args)..., loc};
204205 }
205206};
206- template <typename ... Args>
207- traceftag (std::string_view, std::format_string<Args...>, Args&&...) -> traceftag<Args...>;
207+ template <typename ... Args> traceftag (std::string_view, std::format_string<Args...>, Args&&...)
208+ -> traceftag<Args...>;
208209
209210/* *
210211 * @brief Temporary object for debug-level formatted logging with custom tag.
@@ -229,8 +230,8 @@ template <typename... Args> struct debugftag {
229230 detail::log_helper<level::DEBUG , Args...>{tag, fmt, std::forward<Args>(args)..., loc};
230231 }
231232};
232- template <typename ... Args>
233- debugftag (std::string_view, std::format_string<Args...>, Args&&...) -> debugftag<Args...>;
233+ template <typename ... Args> debugftag (std::string_view, std::format_string<Args...>, Args&&...)
234+ -> debugftag<Args...>;
234235
235236/* *
236237 * @brief Temporary object for info-level formatted logging with custom tag.
@@ -255,8 +256,8 @@ template <typename... Args> struct infoftag {
255256 detail::log_helper<level::INFO , Args...>{tag, fmt, std::forward<Args>(args)..., loc};
256257 }
257258};
258- template <typename ... Args>
259- infoftag (std::string_view, std::format_string<Args...>, Args&&...) -> infoftag<Args...>;
259+ template <typename ... Args> infoftag (std::string_view, std::format_string<Args...>, Args&&...)
260+ -> infoftag<Args...>;
260261
261262/* *
262263 * @brief Temporary object for warning-level formatted logging with custom tag.
@@ -281,8 +282,8 @@ template <typename... Args> struct warningftag {
281282 detail::log_helper<level::WARNING , Args...>{tag, fmt, std::forward<Args>(args)..., loc};
282283 }
283284};
284- template <typename ... Args>
285- warningftag (std::string_view, std::format_string<Args...>, Args&&...) -> warningftag<Args...>;
285+ template <typename ... Args> warningftag (std::string_view, std::format_string<Args...>, Args&&...)
286+ -> warningftag<Args...>;
286287
287288/* *
288289 * @brief Temporary object for error-level formatted logging with custom tag.
@@ -307,34 +308,36 @@ template <typename... Args> struct errorftag {
307308 detail::log_helper<level::ERROR , Args...>{tag, fmt, std::forward<Args>(args)..., loc};
308309 }
309310};
310- template <typename ... Args>
311- errorftag (std::string_view, std::format_string<Args...>, Args&&...) -> errorftag<Args...>;
311+ template <typename ... Args> errorftag (std::string_view, std::format_string<Args...>, Args&&...)
312+ -> errorftag<Args...>;
312313
313314/* *
314315 * @brief Sets the minimum log level.
315316 *
316317 * Only messages at or above this level are processed.
317318 *
318319 * @param[in] lvl Minimum log level to set.
320+ * @return None
319321 * @throws None
320322 * @note None
321323 * @warning None
322324 * @since N/A
323325 * @ingroup cflog
324326 */
325- void set_level (level lvl);
327+ CFLOG_API void set_level (level lvl);
326328
327329/* *
328330 * @brief Flushes all pending log messages.
329331 *
330332 * Blocks until all queued messages are written to sinks.
331333 *
334+ * @return None
332335 * @throws None
333336 * @note This operation may block if the queue is full.
334337 * @warning None
335338 * @since N/A
336339 * @ingroup cflog
337340 */
338- void flush ();
341+ CFLOG_API void flush ();
339342
340343} // namespace cf::log
0 commit comments