mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 20:40:11 +02:00
Log processing cycles on verbosity level 2
This commit is contained in:
@@ -105,6 +105,12 @@ void Logger::log(const std::string& message) {
|
||||
*stream << formatted_message.str() << std::flush;
|
||||
}
|
||||
|
||||
void Logger::log_trace(const std::string& message) {
|
||||
if (verbosity >= Verbosity::all_events) {
|
||||
log(message);
|
||||
}
|
||||
}
|
||||
|
||||
void Logger::log_get_parameter(int index) {
|
||||
if (BOOST_UNLIKELY(verbosity >= Verbosity::most_events)) {
|
||||
std::ostringstream message;
|
||||
|
||||
@@ -55,6 +55,9 @@ class Logger {
|
||||
* The same as the above but without filtering out any events. This is
|
||||
* very chatty but it can be crucial for debugging plugin-specific
|
||||
* problems.
|
||||
*
|
||||
* This will also print print information about the audio processing
|
||||
* callbacks, which can be useful for diagnosing misbehaving plugins.
|
||||
*/
|
||||
all_events = 2,
|
||||
};
|
||||
@@ -114,6 +117,16 @@ class Logger {
|
||||
const EventResultPayload& payload,
|
||||
const std::optional<EventResultPayload>& value_payload);
|
||||
|
||||
/**
|
||||
* Log a message that should only be printed when the `verbosity` is set to
|
||||
* `all_events`. This should only be used for simple primitive messages
|
||||
* without any formatting since the actual check happens within this
|
||||
* function.
|
||||
*
|
||||
* @param message The message to write.
|
||||
*/
|
||||
void log_trace(const std::string& message);
|
||||
|
||||
private:
|
||||
/**
|
||||
* Determine whether an event should be filtered based on the current
|
||||
|
||||
Reference in New Issue
Block a user