]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/logger.cpp
Merge pull request #545 from SaberUK/master+logging-cleanup
[user/henk/code/inspircd.git] / src / logger.cpp
index c83a423f01fd1cd4b88c6a135f1f99bc6bd4b494..bbbb7eafa98428cb1db7915c4fc042bd89ec6cd9 100644 (file)
@@ -299,18 +299,11 @@ bool LogManager::DelLogType(const std::string &type, LogStream *l)
 void LogManager::Log(const std::string &type, LogLevel 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, LogLevel loglevel, const std::string &msg)