diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/filelogger.cpp | 5 | ||||
-rw-r--r-- | src/logger.cpp | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/filelogger.cpp b/src/filelogger.cpp index 245cbbaab..acb210ecb 100644 --- a/src/filelogger.cpp +++ b/src/filelogger.cpp @@ -26,8 +26,7 @@ #include "socketengine.h" #include "filelogger.h" -FileLogStream::FileLogStream(int loglevel, FileWriter *fw) - : LogStream(loglevel), f(fw) +FileLogStream::FileLogStream(LogLevel loglevel, FileWriter *fw) : LogStream(loglevel), f(fw) { ServerInstance->Logs->AddLoggerRef(f); } @@ -38,7 +37,7 @@ FileLogStream::~FileLogStream() ServerInstance->Logs->DelLoggerRef(f); } -void FileLogStream::OnLog(int loglevel, const std::string &type, const std::string &text) +void FileLogStream::OnLog(LogLevel loglevel, const std::string &type, const std::string &text) { static std::string TIMESTR; static time_t LAST = 0; diff --git a/src/logger.cpp b/src/logger.cpp index bc1dd3253..c83a423f0 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -21,7 +21,6 @@ #include "inspircd.h" - #include "filelogger.h" /* @@ -86,7 +85,7 @@ void LogManager::OpenFileLogs() } std::string type = tag->getString("type"); std::string level = tag->getString("level"); - int loglevel = LOG_DEFAULT; + LogLevel loglevel = LOG_DEFAULT; if (level == "rawio") { loglevel = LOG_RAWIO; @@ -297,7 +296,7 @@ bool LogManager::DelLogType(const std::string &type, LogStream *l) 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) { @@ -314,7 +313,7 @@ void LogManager::Log(const std::string &type, int loglevel, const char *fmt, ... this->Log(type, loglevel, std::string(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) { |