OpenShot Library | libopenshot 1.1.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
openshot::Logger Class Reference

Independent file and stderr logging. No networking or worker thread. More...

#include <Logger.h>

Public Types

enum  Level {
  LevelDebug = 10 , LevelInfo = 20 , LevelWarning = 30 , LevelError = 40 ,
  LevelCritical = 50 , LevelOff = 100
}
 

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)
 
void Close ()
 
void Connection (std::string connection)
 Deprecated compatibility no-op; logging no longer uses connections.
 
void Enable (bool enabled)
 Compatibility: enable debug file output, or disable ordinary file output.
 
void Log (std::string message, Level level=LevelDebug)
 
void LogToFile (std::string message)
 Unfiltered raw output, retained for the existing crash handler.
 
void Path (std::string path)
 
void SetConsoleLevel (std::string level)
 
void SetFileLevel (std::string level)
 Explicit configuration overrides environment defaults. Invalid levels throw.
 
bool ShouldLog (Level level=LevelDebug) const
 

Static Public Member Functions

static Logger * Instance ()
 

Detailed Description

Independent file and stderr logging. No networking or worker thread.

Definition at line 14 of file Logger.h.

Member Enumeration Documentation

◆ Level

Enumerator
LevelDebug 
LevelInfo 
LevelWarning 
LevelError 
LevelCritical 
LevelOff 

Definition at line 16 of file Logger.h.

Member Function Documentation

◆ AppendDebugMethod()

void Logger::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 Logger::Close ( )

Definition at line 158 of file Logger.cpp.

◆ Connection()

void openshot::Logger::Connection ( std::string  connection)
inline

Deprecated compatibility no-op; logging no longer uses connections.

Definition at line 30 of file Logger.h.

◆ Enable()

void Logger::Enable ( bool  enabled)

Compatibility: enable debug file output, or disable ordinary file output.

Definition at line 109 of file Logger.cpp.

◆ Instance()

Logger * Logger::Instance ( )
static

◆ Log()

void Logger::Log ( std::string  message,
Level  level = LevelDebug 
)

◆ LogToFile()

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

Unfiltered raw output, retained for the existing crash handler.

Definition at line 142 of file Logger.cpp.

Referenced by Log(), and openshot::CrashHandler::printStackTrace().

◆ Path()

void Logger::Path ( std::string  path)

Definition at line 111 of file Logger.cpp.

◆ SetConsoleLevel()

void Logger::SetConsoleLevel ( std::string  level)

Definition at line 105 of file Logger.cpp.

◆ SetFileLevel()

void Logger::SetFileLevel ( std::string  level)

Explicit configuration overrides environment defaults. Invalid levels throw.

Definition at line 104 of file Logger.cpp.

◆ ShouldLog()

bool Logger::ShouldLog ( Level  level = LevelDebug) const

Definition at line 101 of file Logger.cpp.

Referenced by AppendDebugMethod(), and Log().


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