Fix naming conventions in logger
Tested:
No functional changes.
Change-Id: I10144229b07959de4d8a5d5a471caff8a2b87e6f
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/http/logging.h b/http/logging.h
index 4498c3d..0121729 100644
--- a/http/logging.h
+++ b/http/logging.h
@@ -19,7 +19,7 @@
Critical,
};
-class logger
+class Logger
{
private:
//
@@ -40,7 +40,7 @@
}
public:
- logger([[maybe_unused]] const std::string& prefix,
+ Logger([[maybe_unused]] const std::string& prefix,
[[maybe_unused]] const std::string& filename,
[[maybe_unused]] const size_t line, LogLevel levelIn) :
level(levelIn)
@@ -51,9 +51,9 @@
<< line << "] ";
#endif
}
- ~logger()
+ ~Logger()
{
- if (level >= get_current_log_level())
+ if (level >= getCurrentLogLevel())
{
#ifdef BMCWEB_ENABLE_LOGGING
stringstream << std::endl;
@@ -64,9 +64,9 @@
//
template <typename T>
- logger& operator<<([[maybe_unused]] T const& value)
+ Logger& operator<<([[maybe_unused]] T const& value)
{
- if (level >= get_current_log_level())
+ if (level >= getCurrentLogLevel())
{
#ifdef BMCWEB_ENABLE_LOGGING
stringstream << value;
@@ -81,7 +81,7 @@
getLogLevelRef() = level;
}
- static LogLevel get_current_log_level()
+ static LogLevel getCurrentLogLevel()
{
return getLogLevelRef();
}
@@ -101,17 +101,17 @@
} // namespace crow
#define BMCWEB_LOG_CRITICAL \
- if (crow::logger::get_current_log_level() <= crow::LogLevel::Critical) \
- crow::logger("CRITICAL", __FILE__, __LINE__, crow::LogLevel::Critical)
+ if (crow::Logger::getCurrentLogLevel() <= crow::LogLevel::Critical) \
+ crow::Logger("CRITICAL", __FILE__, __LINE__, crow::LogLevel::Critical)
#define BMCWEB_LOG_ERROR \
- if (crow::logger::get_current_log_level() <= crow::LogLevel::Error) \
- crow::logger("ERROR", __FILE__, __LINE__, crow::LogLevel::Error)
+ if (crow::Logger::getCurrentLogLevel() <= crow::LogLevel::Error) \
+ crow::Logger("ERROR", __FILE__, __LINE__, crow::LogLevel::Error)
#define BMCWEB_LOG_WARNING \
- if (crow::logger::get_current_log_level() <= crow::LogLevel::Warning) \
- crow::logger("WARNING", __FILE__, __LINE__, crow::LogLevel::Warning)
+ if (crow::Logger::getCurrentLogLevel() <= crow::LogLevel::Warning) \
+ crow::Logger("WARNING", __FILE__, __LINE__, crow::LogLevel::Warning)
#define BMCWEB_LOG_INFO \
- if (crow::logger::get_current_log_level() <= crow::LogLevel::Info) \
- crow::logger("INFO", __FILE__, __LINE__, crow::LogLevel::Info)
+ if (crow::Logger::getCurrentLogLevel() <= crow::LogLevel::Info) \
+ crow::Logger("INFO", __FILE__, __LINE__, crow::LogLevel::Info)
#define BMCWEB_LOG_DEBUG \
- if (crow::logger::get_current_log_level() <= crow::LogLevel::Debug) \
- crow::logger("DEBUG", __FILE__, __LINE__, crow::LogLevel::Debug)
+ if (crow::Logger::getCurrentLogLevel() <= crow::LogLevel::Debug) \
+ crow::Logger("DEBUG", __FILE__, __LINE__, crow::LogLevel::Debug)