OpenShot Library | libopenshot
0.4.0
|
Go to the documentation of this file.
13 #ifndef OPENSHOT_LOGGER_H
14 #define OPENSHOT_LOGGER_H
34 std::recursive_mutex loggerMutex;
35 std::string connection;
38 std::string file_path;
39 std::ofstream log_file;
43 zmq::context_t *context;
46 zmq::socket_t *publisher;
74 std::string method_name,
75 std::string arg1_name=
"",
float arg1_value=-1.0,
76 std::string arg2_name=
"",
float arg2_value=-1.0,
77 std::string arg3_name=
"",
float arg3_value=-1.0,
78 std::string arg4_name=
"",
float arg4_value=-1.0,
79 std::string arg5_name=
"",
float arg5_value=-1.0,
80 std::string arg6_name=
"",
float arg6_value=-1.0
90 void Enable(
bool is_enabled) { enabled = is_enabled;};
93 void Path(std::string new_path);
96 void Log(std::string message);
void Connection(std::string new_connection)
Set or change connection info for logger (i.e. tcp://*:5556)
This namespace is the default namespace for all code in the openshot library.
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 Close()
Close logger (sockets and/or files)
This class is used for logging and sending those logs over a ZemoMQ socket to a listener.
void Enable(bool is_enabled)
Enable/Disable logging.
static ZmqLogger * Instance()
Create or get an instance of this logger singleton (invoke the class with this method)
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.
void LogToFile(std::string message)
Log message to a file (if path set)