diff options
author | Peter Powell <petpow@saberuk.com> | 2013-04-12 02:10:06 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2013-04-12 02:21:19 +0100 |
commit | 645f7e18c64a6628ede880dc69bf8825ba93b375 (patch) | |
tree | 88fdf155712654b0c783bb53770d8e80e28b0d10 /include | |
parent | 1858feabd342636df0b52780c978979b4e049fc3 (diff) |
Add LOG_ prefix to the log level enum values.
Diffstat (limited to 'include')
-rw-r--r-- | include/filelogger.h | 17 | ||||
-rw-r--r-- | include/logger.h | 4 | ||||
-rw-r--r-- | include/modules.h | 4 |
3 files changed, 12 insertions, 13 deletions
diff --git a/include/filelogger.h b/include/filelogger.h index 22a94c934..739e4d94b 100644 --- a/include/filelogger.h +++ b/include/filelogger.h @@ -23,19 +23,18 @@ #include "logger.h" -/** Debug levels for use with InspIRCd::Log() +/** Logging levels for use with InspIRCd::Log() * */ -enum DebugLevel +enum LogLevel { - RAWIO = 5, - DEBUG = 10, - VERBOSE = 20, - DEFAULT = 30, - SPARSE = 40, - NONE = 50 + LOG_RAWIO = 5, + LOG_DEBUG = 10, + LOG_VERBOSE = 20, + LOG_DEFAULT = 30, + LOG_SPARSE = 40, + LOG_NONE = 50 }; - /* Forward declaration -- required */ class InspIRCd; diff --git a/include/logger.h b/include/logger.h index 0fa4bc7cd..eee964e15 100644 --- a/include/logger.h +++ b/include/logger.h @@ -199,14 +199,14 @@ class CoreExport LogManager /** Logs an event, sending it to all LogStreams registered for the type. * @param type Log message type (ex: "USERINPUT", "MODULE", ...) - * @param loglevel Log message level (DEBUG, VERBOSE, DEFAULT, SPARSE, NONE) + * @param loglevel Log message level (LOG_DEBUG, LOG_VERBOSE, LOG_DEFAULT, LOG_SPARSE, LOG_NONE) * @param msg The message to be logged (literal). */ void Log(const std::string &type, int loglevel, const std::string &msg); /** Logs an event, sending it to all LogStreams registered for the type. * @param type Log message type (ex: "USERINPUT", "MODULE", ...) - * @param loglevel Log message level (DEBUG, VERBOSE, DEFAULT, SPARSE, NONE) + * @param loglevel Log message level (LOG_DEBUG, LOG_VERBOSE, LOG_DEFAULT, LOG_SPARSE, LOG_NONE) * @param fmt The format of the message to be logged. See your C manual on printf() for details. */ void Log(const std::string &type, int loglevel, const char *fmt, ...) CUSTOM_PRINTF(4, 5); diff --git a/include/modules.h b/include/modules.h index 58062fddd..9ba238da5 100644 --- a/include/modules.h +++ b/include/modules.h @@ -135,7 +135,7 @@ struct ModResult { } \ catch (CoreException& modexcept) \ { \ - ServerInstance->Logs->Log("MODULE",DEFAULT,"Exception caught: %s",modexcept.GetReason()); \ + ServerInstance->Logs->Log("MODULE",LOG_DEFAULT,"Exception caught: %s",modexcept.GetReason()); \ } \ _i = safei; \ } \ @@ -162,7 +162,7 @@ do { \ } \ catch (CoreException& except_ ## n) \ { \ - ServerInstance->Logs->Log("MODULE",DEFAULT,"Exception caught: %s", (except_ ## n).GetReason()); \ + ServerInstance->Logs->Log("MODULE",LOG_DEFAULT,"Exception caught: %s", (except_ ## n).GetReason()); \ (void) mod_ ## n; /* catch mismatched pairs */ \ } \ } \ |