]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Merge pull request #545 from SaberUK/master+logging-cleanup
authorAttila Molnar <attilamolnar@hush.com>
Wed, 22 May 2013 00:11:46 +0000 (17:11 -0700)
committerAttila Molnar <attilamolnar@hush.com>
Wed, 22 May 2013 00:11:46 +0000 (17:11 -0700)
Clean up the logging system (part 1 of 2).

1  2 
include/inspircd.h
include/modules.h
src/helperfuncs.cpp
src/logger.cpp
src/modules.cpp
src/modules/m_blockcaps.cpp
src/modules/m_filter.cpp
src/modules/m_xline_db.cpp
src/usermanager.cpp

Simple merge
Simple merge
Simple merge
diff --cc src/logger.cpp
index 2b0b623f604f6548d3da55f4a609e22113c7e1d1,c83a423f01fd1cd4b88c6a135f1f99bc6bd4b494..bbbb7eafa98428cb1db7915c4fc042bd89ec6cd9
@@@ -293,17 -296,24 +296,17 @@@ bool LogManager::DelLogType(const std::
        return true;
  }
  
- void LogManager::Log(const std::string &type, int loglevel, const char *fmt, ...)
+ 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, int loglevel, const std::string &msg)
+ void LogManager::Log(const std::string &type, LogLevel loglevel, const std::string &msg)
  {
        if (Logging)
        {
diff --cc src/modules.cpp
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge