Add specific logging functions for all the events

This commit is contained in:
Robbert van der Helm
2020-03-07 22:29:21 +01:00
parent 280d9fcd2b
commit ee75dcc7e6
4 changed files with 361 additions and 12 deletions
+18 -2
View File
@@ -17,6 +17,7 @@
#pragma once
#include <memory>
#include <optional>
#include <ostream>
/**
@@ -85,8 +86,23 @@ class Logger {
*/
void log(const std::string& message);
// TODO: Add dedicated logging functions for events and the Wine process's
// STDOUT and STDERR
// The following functions are for logging specific events, they are only
// enabled for verbosity levels higher than 1 (i.e. `Verbosity::events`)
void log_get_parameter(int32_t index);
void log_get_parameter_response(int32_t index, float vlaue);
void log_set_parameter(int32_t index, float value);
void log_set_parameter_response(int32_t index);
// If dispatch is true, then use opcode names from the plugin's dispatch
// function. Otherwise use names for the host callback function opcodes.
void log_event(bool dispatch,
int32_t opcode,
int32_t index,
intptr_t value,
std::optional<std::string> data,
float option);
void log_event_response(bool dispatch,
intptr_t return_value,
std::optional<std::string> data);
private:
/**