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

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 )

Append debug information.

Definition at line 178 of file ZmqLogger.cpp.

Referenced by openshot::Timeline::apply_effects(), openshot::FrameMapper::ChangeMapping(), openshot::Timeline::Clear(), openshot::Clip::Close(), openshot::FFmpegReader::Close(), openshot::FFmpegWriter::Close(), openshot::FrameMapper::Close(), openshot::ImageWriter::Close(), openshot::Timeline::Close(), openshot::FFmpegReader::GetFrame(), openshot::FrameMapper::GetFrame(), openshot::Timeline::GetFrame(), openshot::FrameMapper::GetMappedFrame(), if(), openshot::AudioDeviceManagerSingleton::Instance(), openshot::FFmpegReader::Open(), openshot::FrameMapper::Open(), openshot::FFmpegWriter::PrepareStreams(), openshot::FrameMapper::ResampleMappedAudio(), openshot::FFmpegWriter::SetAudioOptions(), openshot::FFmpegWriter::SetOption(), openshot::FFmpegWriter::SetVideoOptions(), openshot::ImageWriter::SetVideoOptions(), openshot::FFmpegWriter::WriteFrame(), openshot::FFmpegWriter::WriteFrame(), openshot::ImageWriter::WriteFrame(), openshot::FFmpegWriter::WriteHeader(), and openshot::FFmpegWriter::WriteTrailer().

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

ZmqLogger * ZmqLogger::Instance | ( |  | ) |

static

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

Definition at line 35 of file ZmqLogger.cpp.

Referenced by openshot::Timeline::apply_effects(), openshot::FrameMapper::ChangeMapping(), openshot::Timeline::Clear(), openshot::Clip::Close(), openshot::FFmpegReader::Close(), openshot::FFmpegWriter::Close(), openshot::FrameMapper::Close(), openshot::ImageWriter::Close(), openshot::Timeline::Close(), openshot::FFmpegReader::GetFrame(), openshot::FrameMapper::GetFrame(), openshot::Timeline::GetFrame(), openshot::FrameMapper::GetMappedFrame(), if(), openshot::AudioDeviceManagerSingleton::Instance(), openshot::FFmpegReader::Open(), openshot::FrameMapper::Open(), openshot::FFmpegWriter::PrepareStreams(), openshot::CrashHandler::printStackTrace(), openshot::FrameMapper::ResampleMappedAudio(), openshot::FFmpegWriter::SetAudioOptions(), openshot::FFmpegWriter::SetOption(), openshot::FFmpegWriter::SetVideoOptions(), openshot::ImageWriter::SetVideoOptions(), openshot::FFmpegWriter::WriteFrame(), openshot::FFmpegWriter::WriteFrame(), openshot::ImageWriter::WriteFrame(), openshot::FFmpegWriter::WriteHeader(), and openshot::FFmpegWriter::WriteTrailer().

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

- ZmqLogger.h
- FFmpegWriter.cpp
- ZmqLogger.cpp