Antkeeper  0.0.1
Public Member Functions | List of all members
debug::log_message< Severity, Args > Struct Template Reference

Self-formatting message that logs itself to the default logger on construction. More...

#include <log.hpp>

Public Member Functions

 log_message ([[maybe_unused]] std::string_view format, [[maybe_unused]] Args &&... args, [[maybe_unused]] std::source_location &&location=std::source_location::current())
 Formats and logs a message. More...
 

Detailed Description

template<log_message_severity Severity, class... Args>
struct debug::log_message< Severity, Args >

Self-formatting message that logs itself to the default logger on construction.

Template Parameters
SeverityMessage severity. A message will not log itself if Severity is less than the user-defined macro ANTKEEPER_DEBUG_LOG_MIN_MESSAGE_SEVERITY.
ArgsTypes of arguments to be formatted.

Definition at line 52 of file log.hpp.

Constructor & Destructor Documentation

◆ log_message()

template<log_message_severity Severity, class... Args>
debug::log_message< Severity, Args >::log_message ( [[maybe_unused] ] std::string_view  format,
[[maybe_unused] ] Args &&...  args,
[[maybe_unused] ] std::source_location &&  location = std::source_location::current() 
)
inline

Formats and logs a message.

Class template argument deduction (CTAD) is utilized to capture source location as a default argument following variadic format arguments.

Parameters
formatMessage format string.
argsArguments to be formatted.
locationSource location from which the message was sent.

Definition at line 63 of file log.hpp.


The documentation for this struct was generated from the following file: