diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-05-04 20:21:48 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-23 01:32:47 +0200 |
commit | 330626ab22fe2e87afa5306c5f4039088c41b49e (patch) | |
tree | 86a5c7e0f0eb34743d186cbd712d368fed16f748 /src/Logger.h | |
parent | Remove some unused inclusions (diff) | |
download | cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar.gz cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar.bz2 cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar.lz cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar.xz cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.tar.zst cuberite-330626ab22fe2e87afa5306c5f4039088c41b49e.zip |
Diffstat (limited to 'src/Logger.h')
-rw-r--r-- | src/Logger.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/Logger.h b/src/Logger.h index ef86b3313..fee2554be 100644 --- a/src/Logger.h +++ b/src/Logger.h @@ -50,14 +50,10 @@ public: }; /** Log a message formatted with a printf style formatting string. */ - void LogPrintf( - std::string_view a_Format, eLogLevel a_LogLevel, fmt::printf_args a_ArgList - ); + void LogPrintf(std::string_view a_Format, eLogLevel a_LogLevel, fmt::printf_args a_ArgList); /** Log a message formatted with a python style formatting string. */ - void LogFormat( - std::string_view a_Format, eLogLevel a_LogLevel, fmt::format_args a_ArgList - ); + void LogFormat(std::string_view a_Format, eLogLevel a_LogLevel, fmt::format_args a_ArgList); /** Logs the simple text message at the specified log level. */ void LogSimple(std::string_view a_Message, eLogLevel a_LogLevel = eLogLevel::Regular); @@ -65,8 +61,10 @@ public: cAttachment AttachListener(std::unique_ptr<cListener> a_Listener); static cLogger & GetInstance(void); + // Must be called before calling GetInstance in a multithreaded context static void InitiateMultithreading(); + private: cCriticalSection m_CriticalSection; @@ -74,8 +72,4 @@ private: void DetachListener(cListener * a_Listener); void LogLine(std::string_view a_Line, eLogLevel a_LogLevel); - }; - - - |