OpenShot Library | libopenshot  0.4.0
Public Member Functions | Static Public Member Functions | List of all members
openshot::ZmqLogger Class Reference

This class is used for logging and sending those logs over a ZemoMQ socket to a listener. More...

#include <ZmqLogger.h>

Public Member Functions

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. More...
 
void Close ()
 Close logger (sockets and/or files) More...
 
void Connection (std::string new_connection)
 Set or change connection info for logger (i.e. tcp://*:5556) More...
 
void Enable (bool is_enabled)
 Enable/Disable logging. More...
 
void Log (std::string message)
 Log message to all subscribers of this logger (if any) More...
 
void LogToFile (std::string message)
 Log message to a file (if path set) More...
 
void Path (std::string new_path)
 Set or change the file path (optional) More...
 

Static Public Member Functions

static ZmqLoggerInstance ()
 Create or get an instance of this logger singleton (invoke the class with this method) More...
 

Detailed Description

This class is used for logging and sending those logs over a ZemoMQ socket to a listener.

OpenShot desktop editor listens to this port, to receive libopenshot debug output. It both logs to a file and sends the stdout over a socket.

Definition at line 32 of file ZmqLogger.h.

Member Function Documentation

◆ AppendDebugMethod()

void ZmqLogger::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 
)

◆ Close()

void ZmqLogger::Close ( )

Close logger (sockets and/or files)

Definition at line 155 of file ZmqLogger.cpp.

◆ Connection()

void ZmqLogger::Connection ( std::string  new_connection)

Set or change connection info for logger (i.e. tcp://*:5556)

Definition at line 63 of file ZmqLogger.cpp.

Referenced by Instance().

◆ Enable()

void openshot::ZmqLogger::Enable ( bool  is_enabled)
inline

Enable/Disable logging.

Definition at line 90 of file ZmqLogger.h.

◆ Instance()

ZmqLogger * ZmqLogger::Instance ( )
static

◆ Log()

void ZmqLogger::Log ( std::string  message)

Log message to all subscribers of this logger (if any)

Definition at line 103 of file ZmqLogger.cpp.

Referenced by AppendDebugMethod().

◆ LogToFile()

void ZmqLogger::LogToFile ( std::string  message)

Log message to a file (if path set)

Definition at line 128 of file ZmqLogger.cpp.

Referenced by Log().

◆ Path()

void ZmqLogger::Path ( std::string  new_path)

Set or change the file path (optional)

Definition at line 135 of file ZmqLogger.cpp.


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