diff options
Diffstat (limited to 'src/common/Logging/Log.h')
-rw-r--r-- | src/common/Logging/Log.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/common/Logging/Log.h b/src/common/Logging/Log.h index 53a40d62c61..17e0421d422 100644 --- a/src/common/Logging/Log.h +++ b/src/common/Logging/Log.h @@ -60,30 +60,30 @@ class TC_COMMON_API Log Log& operator=(Log const&) = delete; Log& operator=(Log&&) = delete; - static Log* instance(); + static Log* instance() noexcept; void Initialize(Trinity::Asio::IoContext* ioContext); void SetSynchronous(); // Not threadsafe - should only be called from main() after all threads are joined void LoadFromConfig(); void Close(); - bool ShouldLog(std::string_view type, LogLevel level) const; - Logger const* GetEnabledLogger(std::string_view type, LogLevel level) const; + bool ShouldLog(std::string_view type, LogLevel level) const noexcept; + Logger const* GetEnabledLogger(std::string_view type, LogLevel level) const noexcept; bool SetLogLevel(std::string const& name, int32 level, bool isLogger = true); template<typename... Args> - void OutMessage(std::string_view filter, LogLevel level, Trinity::FormatString<Args...> fmt, Args&&... args) + void OutMessage(std::string_view filter, LogLevel level, Trinity::FormatString<Args...> fmt, Args&&... args) noexcept { this->OutMessageImpl(GetLoggerByType(filter), filter, level, fmt, Trinity::MakeFormatArgs(args...)); } template<typename... Args> - void OutMessageTo(Logger const* logger, std::string_view filter, LogLevel level, Trinity::FormatString<Args...> fmt, Args&&... args) + void OutMessageTo(Logger const* logger, std::string_view filter, LogLevel level, Trinity::FormatString<Args...> fmt, Args&&... args) noexcept { this->OutMessageImpl(logger, filter, level, fmt, Trinity::MakeFormatArgs(args...)); } template<typename... Args> - void OutCommand(uint32 account, Trinity::FormatString<Args...> fmt, Args&&... args) + void OutCommand(uint32 account, Trinity::FormatString<Args...> fmt, Args&&... args) noexcept { if (!ShouldLog("commands.gm", LOG_LEVEL_INFO)) return; @@ -91,7 +91,7 @@ class TC_COMMON_API Log this->OutCommandImpl(account, fmt, Trinity::MakeFormatArgs(args...)); } - void OutCharDump(std::string const& str, uint32 account_id, uint64 guid, std::string const& name) const; + void OutCharDump(std::string const& str, uint32 account_id, uint64 guid, std::string const& name) const noexcept; void SetRealmId(uint32 id); @@ -136,8 +136,8 @@ class TC_COMMON_API Log void ReadAppendersFromConfig(); void ReadLoggersFromConfig(); void RegisterAppender(uint8 index, AppenderCreatorFn appenderCreateFn); - void OutMessageImpl(Logger const* logger, std::string_view filter, LogLevel level, Trinity::FormatStringView messageFormat, Trinity::FormatArgs messageFormatArgs) const; - void OutCommandImpl(uint32 account, Trinity::FormatStringView messageFormat, Trinity::FormatArgs messageFormatArgs) const; + void OutMessageImpl(Logger const* logger, std::string_view filter, LogLevel level, Trinity::FormatStringView messageFormat, Trinity::FormatArgs messageFormatArgs) const noexcept; + void OutCommandImpl(uint32 account, Trinity::FormatStringView messageFormat, Trinity::FormatArgs messageFormatArgs) const noexcept; std::unordered_map<uint8, AppenderCreatorFn> appenderFactory; std::unordered_map<uint8, std::unique_ptr<Appender>> appenders; |