Agora  1.2.0
Agora project
spdlog::sinks::rotating_file_sink< Mutex > Class Template Referencefinal

#include <rotating_file_sink.h>

Inheritance diagram for spdlog::sinks::rotating_file_sink< Mutex >:
Collaboration diagram for spdlog::sinks::rotating_file_sink< Mutex >:

Public Member Functions

 rotating_file_sink (filename_t base_filename, std::size_t max_size, std::size_t max_files, bool rotate_on_open=false, const file_event_handlers &event_handlers={})
 
filename_t filename ()
 
- Public Member Functions inherited from spdlog::sinks::base_sink< Mutex >
 base_sink ()
 
 base_sink (std::unique_ptr< spdlog::formatter > formatter)
 
 ~base_sink () override=default
 
 base_sink (const base_sink &)=delete
 
 base_sink (base_sink &&)=delete
 
base_sinkoperator= (const base_sink &)=delete
 
base_sinkoperator= (base_sink &&)=delete
 
void log (const details::log_msg &msg) final
 
void flush () final
 
void set_pattern (const std::string &pattern) final
 
void set_formatter (std::unique_ptr< spdlog::formatter > sink_formatter) final
 
- Public Member Functions inherited from spdlog::sinks::sink
virtual ~sink ()=default
 
void set_level (level::level_enum log_level)
 
level::level_enum level () const
 
bool should_log (level::level_enum msg_level) const
 

Static Public Member Functions

static filename_t calc_filename (const filename_t &filename, std::size_t index)
 

Protected Member Functions

void sink_it_ (const details::log_msg &msg) override
 
void flush_ () override
 
- Protected Member Functions inherited from spdlog::sinks::base_sink< Mutex >
virtual void set_pattern_ (const std::string &pattern)
 
virtual void set_formatter_ (std::unique_ptr< spdlog::formatter > sink_formatter)
 

Private Member Functions

void rotate_ ()
 
bool rename_file_ (const filename_t &src_filename, const filename_t &target_filename)
 

Private Attributes

filename_t base_filename_
 
std::size_t max_size_
 
std::size_t max_files_
 
std::size_t current_size_
 
details::file_helper file_helper_
 

Additional Inherited Members

- Protected Attributes inherited from spdlog::sinks::base_sink< Mutex >
std::unique_ptr< spdlog::formatterformatter_
 
Mutex mutex_
 
- Protected Attributes inherited from spdlog::sinks::sink
level_t level_ {level::trace}
 

Constructor & Destructor Documentation

◆ rotating_file_sink()

template<typename Mutex >
SPDLOG_INLINE spdlog::sinks::rotating_file_sink< Mutex >::rotating_file_sink ( filename_t  base_filename,
std::size_t  max_size,
std::size_t  max_files,
bool  rotate_on_open = false,
const file_event_handlers event_handlers = {} 
)

Member Function Documentation

◆ calc_filename()

template<typename Mutex >
SPDLOG_INLINE filename_t spdlog::sinks::rotating_file_sink< Mutex >::calc_filename ( const filename_t filename,
std::size_t  index 
)
static
Here is the call graph for this function:

◆ filename()

template<typename Mutex >
SPDLOG_INLINE filename_t spdlog::sinks::rotating_file_sink< Mutex >::filename

◆ flush_()

template<typename Mutex >
SPDLOG_INLINE void spdlog::sinks::rotating_file_sink< Mutex >::flush_
overrideprotectedvirtual

◆ rename_file_()

template<typename Mutex >
SPDLOG_INLINE bool spdlog::sinks::rotating_file_sink< Mutex >::rename_file_ ( const filename_t src_filename,
const filename_t target_filename 
)
private
Here is the call graph for this function:

◆ rotate_()

template<typename Mutex >
SPDLOG_INLINE void spdlog::sinks::rotating_file_sink< Mutex >::rotate_
private
Here is the call graph for this function:

◆ sink_it_()

template<typename Mutex >
SPDLOG_INLINE void spdlog::sinks::rotating_file_sink< Mutex >::sink_it_ ( const details::log_msg msg)
overrideprotectedvirtual

Implements spdlog::sinks::base_sink< Mutex >.

Here is the call graph for this function:

Member Data Documentation

◆ base_filename_

template<typename Mutex >
filename_t spdlog::sinks::rotating_file_sink< Mutex >::base_filename_
private

◆ current_size_

template<typename Mutex >
std::size_t spdlog::sinks::rotating_file_sink< Mutex >::current_size_
private

◆ file_helper_

template<typename Mutex >
details::file_helper spdlog::sinks::rotating_file_sink< Mutex >::file_helper_
private

◆ max_files_

template<typename Mutex >
std::size_t spdlog::sinks::rotating_file_sink< Mutex >::max_files_
private

◆ max_size_

template<typename Mutex >
std::size_t spdlog::sinks::rotating_file_sink< Mutex >::max_size_
private

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