7#include "detail/LogInternal.h"
24 std::string_view subsystem,
25 std::string_view function,
27 std::string_view message);
38 std::string_view subsystem,
39 std::string_view function,
41 std::string_view message);
47 #define NC_LOG_INFO(str, ...) nc::detail::LogCallback(nc::LogCategory::Info, NC_LOG_CAPTURE_DEFAULT_ARGS(str NC_OPT_EXPAND(__VA_ARGS__)));
48 #define NC_LOG_WARNING(str, ...) nc::detail::LogCallback(nc::LogCategory::Warning, NC_LOG_CAPTURE_DEFAULT_ARGS(str NC_OPT_EXPAND(__VA_ARGS__)));
49 #define NC_LOG_ERROR(str, ...) nc::detail::LogCallback(nc::LogCategory::Error, NC_LOG_CAPTURE_DEFAULT_ARGS(str NC_OPT_EXPAND(__VA_ARGS__)));
50 #define NC_LOG_EXCEPTION(exception) nc::detail::LogException(exception);
52 #define NC_LOG_INFO_EXT(subsystem, file, line, str) nc::detail::LogCallback(nc::LogCategory::Info, subsystem, file, line, str);
53 #define NC_LOG_WARNING_EXT(subsystem, file, line, str) nc::detail::LogCallback(nc::LogCategory::Warning, subsystem, file, line, str);
54 #define NC_LOG_ERROR_EXT(subsystem, file, line, str) nc::detail::LogCallback(nc::LogCategory::Error, subsystem, file, line, str);
56 #define NC_LOG_INFO(str, ...);
57 #define NC_LOG_WARNING(str, ...);
58 #define NC_LOG_ERROR(str, ...);
59 #define NC_LOG_EXCEPTION(exception);
61 #define NC_LOG_INFO_EXT(subsystem, file, line, str);
62 #define NC_LOG_WARNING_EXT(subsystem, file, line, str);
63 #define NC_LOG_ERROR_EXT(subsystem, file, line, str);
67 #define NC_LOG_TRACE(str, ...) nc::detail::LogCallback(nc::LogCategory::Verbose, NC_LOG_CAPTURE_DEFAULT_ARGS(str NC_OPT_EXPAND(__VA_ARGS__)));
68 #define NC_LOG_TRACE_EXT(subsystem, file, line, str) nc::detail::LogCallback(nc::LogCategory::Verbose, subsystem, file, line, str);
70 #define NC_LOG_TRACE(str, ...);
71 #define NC_LOG_TRACE_EXT(subsystem, file, line, str);
void SetLogCallback(LogCallback_t callback)
Set a callback to reroute logging messages (defaults to stdout).
void(*)(LogCategory category, std::string_view subsystem, std::string_view function, int line, std::string_view message) LogCallback_t
Function type for receiving logging messages.
Definition: Log.h:27
LogCategory
Type of a log message.
Definition: Log.h:15