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

Static Public Member Functions

static ZmqLogger * Instance ()
 Create or get an instance of this logger singleton (invoke the class with this method).

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()

◆ 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.

◆ Enable()

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

Enable/Disable logging.

Definition at line 90 of file ZmqLogger.h.

◆ Instance()

◆ 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(), and openshot::CrashHandler::printStackTrace().

◆ 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: