summaryrefslogtreecommitdiff
path: root/src/utils/logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/logger.cpp')
-rw-r--r--src/utils/logger.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/utils/logger.cpp b/src/utils/logger.cpp
index eab8c39d..e3b48c38 100644
--- a/src/utils/logger.cpp
+++ b/src/utils/logger.cpp
@@ -65,7 +65,7 @@ static std::string getCurrentTime()
return os.str();
}
-void Logger::output(std::ostream &os, std::string const &msg, char const *prefix)
+void Logger::output(std::ostream &os, const std::string &msg, const char *prefix)
{
if (mHasTimestamp)
{
@@ -80,7 +80,7 @@ void Logger::output(std::ostream &os, std::string const &msg, char const *prefix
os << msg << std::endl;
}
-void Logger::setLogFile(std::string const &logFile)
+void Logger::setLogFile(const std::string &logFile)
{
// Close the current log file.
if (mLogFile.is_open())
@@ -103,10 +103,16 @@ void Logger::setLogFile(std::string const &logFile)
}
}
-void Logger::output(std::string const& msg, Level atVerbosity)
+void Logger::output(const std::string &msg, Level atVerbosity)
{
- static char const *prefixes[] =
- { "[FTL]", "[ERR]", "[WRN]", "[INF]", "[DBG]" };
+ static const char *prefixes[] =
+ {
+ "[FTL]",
+ "[ERR]",
+ "[WRN]",
+ "[INF]",
+ "[DBG]"
+ };
if (mVerbosity >= atVerbosity)
{