numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::logging::sinks Namespace Reference

Namespace of log sinks. More...

Namespaces

namespace  impl
 Namespace of internal implementations.
 

Classes

class  combined_log_sink
 Class of log sinks to write logs to multiple log sinks. More...
 
class  file_wrapper
 Class to wrap file pointer. More...
 
class  log_sink
 Class of log sinks. More...
 

Functions

NUM_COLLECT_EXPORT auto create_colored_console_sink () -> log_sink
 Create a log sink to write to console with color.
 
auto create_combined_log_sink (std::vector< std::pair< log_sink, log_level > > sinks) -> log_sink
 Create a log sink to write logs to multiple log sinks.
 
template<typename T , typename... Args>
auto create_log_sink (Args &&... args) -> log_sink
 Create a log sink.
 
NUM_COLLECT_EXPORT auto create_non_colored_console_sink () -> log_sink
 Create a log sink to write to console without color.
 
NUM_COLLECT_EXPORT auto create_single_file_sink (std::string_view filepath) -> log_sink
 Create a log sink to write to a single file.
 
NUM_COLLECT_EXPORT auto get_default_log_sink () -> log_sink
 Get the default log sink.
 

Detailed Description

Namespace of log sinks.

Function Documentation

◆ create_colored_console_sink()

NUM_COLLECT_EXPORT auto num_collect::logging::sinks::create_colored_console_sink ( ) -> log_sink
nodiscard

Create a log sink to write to console with color.

Returns
Log sink.

◆ create_combined_log_sink()

auto num_collect::logging::sinks::create_combined_log_sink ( std::vector< std::pair< log_sink, log_level > > sinks) -> log_sink
inlinenodiscard

Create a log sink to write logs to multiple log sinks.

Parameters
[in]sinksLog sinks with log levels.
Returns
Log sink to write logs to all of the given log sinks.

Definition at line 90 of file combined_log_sink.h.

◆ create_log_sink()

template<typename T , typename... Args>
auto num_collect::logging::sinks::create_log_sink ( Args &&... args) -> log_sink
nodiscard

Create a log sink.

Template Parameters
TClass with write function which has the same signature as log_sink class.
ArgsTypes of arguments.
Parameters
[in]argsArguments.
Returns
Log sink.

Definition at line 146 of file log_sink.h.

◆ create_non_colored_console_sink()

NUM_COLLECT_EXPORT auto num_collect::logging::sinks::create_non_colored_console_sink ( ) -> log_sink
nodiscard

Create a log sink to write to console without color.

Returns
Log sink.

◆ create_single_file_sink()

NUM_COLLECT_EXPORT auto num_collect::logging::sinks::create_single_file_sink ( std::string_view filepath) -> log_sink
nodiscard

Create a log sink to write to a single file.

Parameters
[in]filepathFilepath.
Returns
Log sink.

◆ get_default_log_sink()

NUM_COLLECT_EXPORT auto num_collect::logging::sinks::get_default_log_sink ( ) -> log_sink
nodiscard

Get the default log sink.

Returns
Log sink.