Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::utils::ILogger Class Referenceabstract
Inheritance diagram for zrythm::utils::ILogger:

Public Member Functions

void init_sinks (bool for_testing)
std::vector< Utf8Stringget_last_log_entries (size_t count, bool formatted) const
virtual std::pair< fs::path, fs::path > generate_compresed_file (fs::path &dir, fs::path &path) const =0
 Generates a compressed log file (for sending with bug reports).
const std::shared_ptr< spdlog::logger > & get_logger () const
virtual bool need_backtrace () const =0
virtual fs::path get_log_file_path () const =0

Protected Attributes

std::shared_ptr< spdlog::logger > logger_
double last_bt_time_ = 0
 Last timestamp a backtrace was obtained.

Detailed Description

Definition at line 18 of file logger.h.

Member Function Documentation

◆ generate_compresed_file()

virtual std::pair< fs::path, fs::path > zrythm::utils::ILogger::generate_compresed_file ( fs::path & dir,
fs::path & path ) const
pure virtual

Generates a compressed log file (for sending with bug reports).

Returns
The directory and the path of the compressed file.
Exceptions
ZrythmExceptionon failure.

Implemented in zrythm::utils::Logger, and zrythm::utils::TestLogger.

◆ get_logger()

const std::shared_ptr< spdlog::logger > & zrythm::utils::ILogger::get_logger ( ) const
inlinenodiscard

Definition at line 41 of file logger.h.

Field Documentation

◆ last_bt_time_

double zrythm::utils::ILogger::last_bt_time_ = 0
protected

Last timestamp a backtrace was obtained.

This is used to avoid calculating too many backtraces and showing too many error popups at once.

Definition at line 62 of file logger.h.

◆ logger_

std::shared_ptr<spdlog::logger> zrythm::utils::ILogger::logger_
protected

Definition at line 54 of file logger.h.


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