31#ifndef OPENSHOT_LOGGER_H
32#define OPENSHOT_LOGGER_H
45#include <OpenShotAudio.h>
59 juce::CriticalSection loggerCriticalSection;
60 std::string connection;
63 std::string file_path;
64 std::ofstream log_file;
68 zmq::context_t *context;
71 zmq::socket_t *publisher;
99 std::string method_name,
100 std::string arg1_name=
"",
float arg1_value=-1.0,
101 std::string arg2_name=
"",
float arg2_value=-1.0,
102 std::string arg3_name=
"",
float arg3_value=-1.0,
103 std::string arg4_name=
"",
float arg4_value=-1.0,
104 std::string arg5_name=
"",
float arg5_value=-1.0,
105 std::string arg6_name=
"",
float arg6_value=-1.0
115 void Enable(
bool is_enabled) { enabled = is_enabled;};
118 void Path(std::string new_path);
121 void Log(std::string message);
Header file for global Settings class.
This class is used for logging and sending those logs over a ZemoMQ socket to a listener.
void Close()
Close logger (sockets and/or files)
void Enable(bool is_enabled)
Enable/Disable logging.
void Log(std::string message)
Log message to all subscribers of this logger (if any)
void Path(std::string new_path)
Set or change the file path (optional)
void LogToFile(std::string message)
Log message to a file (if path set)
void Connection(std::string new_connection)
Set or change connection info for logger (i.e. tcp://*:5556)
void AppendDebugMethod(std::string method_name, std::string arg1_name="", float arg1_value=-1.0, std::string arg2_name="", float arg2_value=-1.0, std::string arg3_name="", float arg3_value=-1.0, std::string arg4_name="", float arg4_value=-1.0, std::string arg5_name="", float arg5_value=-1.0, std::string arg6_name="", float arg6_value=-1.0)
Append debug information.
static ZmqLogger * Instance()
Create or get an instance of this logger singleton (invoke the class with this method)
This namespace is the default namespace for all code in the openshot library.