3#ifndef OPENSHOT_LOGGER_H
4#define OPENSHOT_LOGGER_H
32 std::string arg1_name=
"",
float arg1_value=-1.0,
33 std::string arg2_name=
"",
float arg2_value=-1.0,
34 std::string arg3_name=
"",
float arg3_value=-1.0,
35 std::string arg4_name=
"",
float arg4_value=-1.0,
36 std::string arg5_name=
"",
float arg5_value=-1.0,
37 std::string arg6_name=
"",
float arg6_value=-1.0);
43 std::recursive_mutex loggerMutex;
44 std::ofstream log_file;
45 std::string file_path;
47 std::atomic<int> console_level{
LevelInfo};
48 std::atomic<bool> file_open{
false};
49 std::atomic<bool> console_configured{
false};
50 int ConsoleLevel()
const;
Independent file and stderr logging. No networking or worker thread.
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 SetFileLevel(std::string level)
Explicit configuration overrides environment defaults. Invalid levels throw.
void SetConsoleLevel(std::string level)
void Path(std::string path)
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.
bool ShouldLog(Level level=LevelDebug) const
void LogToFile(std::string message)
Unfiltered raw output, retained for the existing crash handler.
void Log(std::string message, Level level=LevelDebug)
static Logger * Instance()
This class is contains settings used by libopenshot (and can be safely toggled at any point)
This namespace is the default namespace for all code in the openshot library.