quill
Classes | Public Member Functions | Static Public Member Functions | List of all members
detail::SinkManager Class Reference

Public Member Functions

 SinkManager (SinkManager const &)=delete
 
SinkManageroperator= (SinkManager const &)=delete
 
QUILL_NODISCARD std::shared_ptr< Sinkget_sink (std::string const &sink_name) const
 
template<typename TSink , typename... Args>
std::shared_ptr< Sinkcreate_sink (std::string const &sink_name, Args &&... args)
 Creates a new sink with the given name. More...
 
template<typename TSink , typename... Args>
std::shared_ptr< Sinkcreate_or_get_sink (std::string const &sink_name, Args &&... args)
 Creates a new sink or returns an existing one with the given name. More...
 
uint32_t cleanup_unused_sinks ()
 

Static Public Member Functions

static QUILL_EXPORT SinkManagerinstance () noexcept
 

Member Function Documentation

◆ create_or_get_sink()

template<typename TSink , typename... Args>
std::shared_ptr<Sink> detail::SinkManager::create_or_get_sink ( std::string const &  sink_name,
Args &&...  args 
)
inline

Creates a new sink or returns an existing one with the given name.

Note
If a sink with the specified name already exists, the existing sink is returned and the provided constructor arguments are ignored.

◆ create_sink()

template<typename TSink , typename... Args>
std::shared_ptr<Sink> detail::SinkManager::create_sink ( std::string const &  sink_name,
Args &&...  args 
)
inline

Creates a new sink with the given name.

Exceptions
QuillErrorif a sink with the same name already exists.

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