summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/account-server/main-account.cpp2
-rw-r--r--src/game-server/main-game.cpp2
-rw-r--r--src/utils/logger.cpp4
-rw-r--r--src/utils/logger.h30
4 files changed, 19 insertions, 19 deletions
diff --git a/src/account-server/main-account.cpp b/src/account-server/main-account.cpp
index e7e0875..453aaec 100644
--- a/src/account-server/main-account.cpp
+++ b/src/account-server/main-account.cpp
@@ -265,7 +265,7 @@ static void printHelp()
struct CommandLineOptions
{
CommandLineOptions():
- verbosity(Logger::INFO),
+ verbosity(Logger::Info),
port(Configuration::getValue("net_accountServerPort",
DEFAULT_SERVER_PORT))
{}
diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp
index b49f46d..050f42b 100644
--- a/src/game-server/main-game.cpp
+++ b/src/game-server/main-game.cpp
@@ -245,7 +245,7 @@ void printHelp()
struct CommandLineOptions
{
CommandLineOptions():
- verbosity(Logger::INFO),
+ verbosity(Logger::Info),
port(0)
{}
diff --git a/src/utils/logger.cpp b/src/utils/logger.cpp
index b9c8d61..cd2ed94 100644
--- a/src/utils/logger.cpp
+++ b/src/utils/logger.cpp
@@ -35,7 +35,7 @@ namespace utils
static std::ofstream mLogFile; /**< Log file. */
bool Logger::mHasTimestamp = true; /**< Timestamp flag. */
bool Logger::mTeeMode = false; /**< Tee mode flag. */
-Logger::Level Logger::mVerbosity = Logger::INFO; /**< Verbosity level. */
+Logger::Level Logger::mVerbosity = Logger::Info; /**< Verbosity level. */
/**
* Gets the current time.
@@ -125,7 +125,7 @@ void Logger::output(const std::string &msg, Level atVerbosity)
if (!open || mTeeMode)
{
- output(atVerbosity <= WARN ? std::cerr : std::cout,
+ output(atVerbosity <= Warn ? std::cerr : std::cout,
msg, prefixes[atVerbosity]);
}
}
diff --git a/src/utils/logger.h b/src/utils/logger.h
index 3b3ca75..1b4c2a7 100644
--- a/src/utils/logger.h
+++ b/src/utils/logger.h
@@ -58,12 +58,12 @@ namespace utils
* // log messages using APIs.
* std::ostringstream os;
* os << "level: " << 3;
- * Logger::output(os.str(), Logger::DEBUG);
+ * Logger::output(os.str(), Logger::Debug);
*
- * Logger::output("init sound", Logger::INFO);
- * Logger::output("not implemented", Logger::WARN);
- * Logger::output("resource not found", Logger::ERROR);
- * Logger::output("unable to init graphics", Logger::FATAL);
+ * Logger::output("init sound", Logger::Info);
+ * Logger::output("not implemented", Logger::Warn);
+ * Logger::output("resource not found", Logger::Error);
+ * Logger::output("unable to init graphics", Logger::Fatal);
*
* return 0;
* }
@@ -74,11 +74,11 @@ class Logger
public:
enum Level
{
- FATAL = 0,
- ERROR,
- WARN,
- INFO,
- DEBUG
+ Fatal = 0,
+ Error,
+ Warn,
+ Info,
+ Debug
};
/**
@@ -161,10 +161,10 @@ class Logger
::utils::Logger::output(os.str(), ::utils::Logger::level); \
} while (0)
-#define LOG_DEBUG(msg) LOG(DEBUG, msg)
-#define LOG_INFO(msg) LOG(INFO, msg)
-#define LOG_WARN(msg) LOG(WARN, msg)
-#define LOG_ERROR(msg) LOG(ERROR, msg)
-#define LOG_FATAL(msg) LOG(FATAL, msg)
+#define LOG_DEBUG(msg) LOG(Debug, msg)
+#define LOG_INFO(msg) LOG(Info, msg)
+#define LOG_WARN(msg) LOG(Warn, msg)
+#define LOG_ERROR(msg) LOG(Error, msg)
+#define LOG_FATAL(msg) LOG(Fatal, msg)
#endif // LOGGER_H