Agora  1.2.0
Agora project
spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc > Class Template Referencefinal

#include <hourly_file_sink.h>

Inheritance diagram for spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >:
Collaboration diagram for spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >:

Public Member Functions

 hourly_file_sink (filename_t base_filename, bool truncate=false, uint16_t max_files=0, 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
 

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 init_filenames_q_ ()
 
tm now_tm (log_clock::time_point tp)
 
log_clock::time_point next_rotation_tp_ ()
 
void delete_old_ ()
 

Private Attributes

filename_t base_filename_
 
log_clock::time_point rotation_tp_
 
details::file_helper file_helper_
 
bool truncate_
 
uint16_t max_files_
 
details::circular_q< filename_tfilenames_q_
 

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

◆ hourly_file_sink()

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::hourly_file_sink ( filename_t  base_filename,
bool  truncate = false,
uint16_t  max_files = 0,
const file_event_handlers event_handlers = {} 
)
inline

Member Function Documentation

◆ delete_old_()

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
void spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::delete_old_ ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ filename()

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
filename_t spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::filename ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flush_()

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
void spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::flush_ ( )
inlineoverrideprotectedvirtual

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

Here is the call graph for this function:

◆ init_filenames_q_()

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
void spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::init_filenames_q_ ( )
inlineprivate
Here is the call graph for this function:

◆ next_rotation_tp_()

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
log_clock::time_point spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::next_rotation_tp_ ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ now_tm()

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
tm spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::now_tm ( log_clock::time_point  tp)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sink_it_()

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
void spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::sink_it_ ( const details::log_msg msg)
inlineoverrideprotectedvirtual

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

Here is the call graph for this function:

Member Data Documentation

◆ base_filename_

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
filename_t spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::base_filename_
private

◆ file_helper_

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
details::file_helper spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::file_helper_
private

◆ filenames_q_

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
details::circular_q<filename_t> spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::filenames_q_
private

◆ max_files_

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
uint16_t spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::max_files_
private

◆ rotation_tp_

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
log_clock::time_point spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::rotation_tp_
private

◆ truncate_

template<typename Mutex , typename FileNameCalc = hourly_filename_calculator>
bool spdlog::sinks::hourly_file_sink< Mutex, FileNameCalc >::truncate_
private

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