quill
Public Member Functions | List of all members
NullSink Class Reference
Inheritance diagram for NullSink:
Inheritance graph
[legend]
Collaboration diagram for NullSink:
Collaboration graph
[legend]

Public Member Functions

QUILL_ATTRIBUTE_HOT void write_log (MacroMetadata const *log_metadata, uint64_t log_timestamp, std::string_view thread_id, std::string_view thread_name, std::string const &process_id, std::string_view logger_name, LogLevel log_level, std::string_view log_level_description, std::string_view log_level_short_code, std::vector< std::pair< std::string, std::string >> const *named_args, std::string_view log_message, std::string_view log_statement) override
 Logs a formatted log message to the sink. More...
 
QUILL_ATTRIBUTE_HOT void flush_sink () override
 Flushes the sink, synchronizing the associated sink with its controlled output sequence.
 
- Public Member Functions inherited from Sink
 Sink (std::optional< PatternFormatterOptions > override_pattern_formatter_options=std::nullopt)
 Constructor Uses the default pattern formatter.
 
virtual ~Sink ()=default
 Destructor.
 
 Sink (Sink const &)=delete
 
Sinkoperator= (Sink const &)=delete
 
void set_log_level_filter (LogLevel log_level)
 Sets a log level filter on the sink. More...
 
QUILL_NODISCARD LogLevel get_log_level_filter () const noexcept
 Returns the current log level filter set on the sink. More...
 
void add_filter (std::unique_ptr< Filter > filter)
 Adds a new filter to the sink. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Sink
virtual QUILL_ATTRIBUTE_HOT void run_periodic_tasks () noexcept
 Executes periodic tasks by the backend thread, providing an opportunity for the user to perform custom tasks. More...
 
QUILL_NODISCARD bool apply_all_filters (MacroMetadata const *log_metadata, uint64_t log_timestamp, std::string_view thread_id, std::string_view thread_name, std::string_view logger_name, LogLevel log_level, std::string_view log_message, std::string_view log_statement)
 Applies all registered filters to the log record. More...
 

Member Function Documentation

◆ write_log()

QUILL_ATTRIBUTE_HOT void NullSink::write_log ( MacroMetadata const *  log_metadata,
uint64_t  log_timestamp,
std::string_view  thread_id,
std::string_view  thread_name,
std::string const &  process_id,
std::string_view  logger_name,
LogLevel  log_level,
std::string_view  log_level_description,
std::string_view  log_level_short_code,
std::vector< std::pair< std::string, std::string >> const *  named_args,
std::string_view  log_message,
std::string_view  log_statement 
)
inlineoverridevirtual

Logs a formatted log message to the sink.

Note
Accessor for backend processing.
Parameters
log_metadataPointer to the macro metadata.
log_timestampTimestamp of the log event.
thread_idID of the thread.
thread_nameName of the thread.
process_idProcess Id
logger_nameName of the logger.
log_levelLog level of the message.
log_level_descriptionDescription of the log level.
log_level_short_codeShort code representing the log level.
named_argsVector of key-value pairs of named args
log_messageThe log message.
log_statementThe log statement.

Implements Sink.


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