diff options
author | Attila Molnar <attilamolnar@hush.com> | 2013-05-20 11:05:05 -0700 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2013-05-20 11:05:05 -0700 |
commit | 991a6a429bd6abc70c0eac33bcca124b0600cc0f (patch) | |
tree | 73961818b96646cfbe0a0ff945a23db04edc4823 /src/logger.cpp | |
parent | 3ce33ee0e6bc0b8fbe2a564a37e02d2e56510b06 (diff) | |
parent | 4e40ee49bba3f7bab05a58516e2039351fb33069 (diff) |
Merge pull request #542 from ShutterQuick/inspircd+printfcleanup
Replaced all the individual vsnprintfing with a macro
Diffstat (limited to 'src/logger.cpp')
-rw-r--r-- | src/logger.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/logger.cpp b/src/logger.cpp index b33f65ac4..2b0b623f6 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -296,18 +296,11 @@ bool LogManager::DelLogType(const std::string &type, LogStream *l) void LogManager::Log(const std::string &type, int loglevel, const char *fmt, ...) { if (Logging) - { return; - } - - va_list a; - static char buf[65536]; - - va_start(a, fmt); - vsnprintf(buf, 65536, fmt, a); - va_end(a); - this->Log(type, loglevel, std::string(buf)); + std::string buf; + VAFORMAT(buf, fmt, fmt); + this->Log(type, loglevel, buf); } void LogManager::Log(const std::string &type, int loglevel, const std::string &msg) |