aboutsummaryrefslogtreecommitdiffstats
path: root/src/Log.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-24 20:29:24 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-24 20:29:24 +0200
commit223d70be498dc240a92bb8961bfd5d99cebbcf1d (patch)
tree934567377d5db3caee7263d7ffc4fc243285c399 /src/Log.cpp
parent5297666e1352be672c7dc6fe3af44950a52428da (diff)
downloaddabmod-223d70be498dc240a92bb8961bfd5d99cebbcf1d.tar.gz
dabmod-223d70be498dc240a92bb8961bfd5d99cebbcf1d.tar.bz2
dabmod-223d70be498dc240a92bb8961bfd5d99cebbcf1d.zip
Minor improvements in log
Diffstat (limited to 'src/Log.cpp')
-rw-r--r--src/Log.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Log.cpp b/src/Log.cpp
index 155fc00..77687fc 100644
--- a/src/Log.cpp
+++ b/src/Log.cpp
@@ -114,7 +114,7 @@ LogLine Logger::level(log_level_t level)
return LogLine(this, level);
}
-void LogToFile::log(log_level_t level, std::string message)
+void LogToFile::log(log_level_t level, const std::string& message)
{
if (level != log_level_t::trace) {
const char* log_level_text[] = {
@@ -127,7 +127,7 @@ void LogToFile::log(log_level_t level, std::string message)
}
}
-void LogToSyslog::log(log_level_t level, std::string message)
+void LogToSyslog::log(log_level_t level, const std::string& message)
{
if (level != log_level_t::trace) {
int syslog_level = LOG_EMERG;
@@ -165,7 +165,7 @@ LogTracer::LogTracer(const string& trace_filename)
fprintf(m_trace_file, "0,TRACER,startup at %ld\n", m_trace_micros_startup);
}
-void LogTracer::log(log_level_t level, std::string message)
+void LogTracer::log(log_level_t level, const std::string& message)
{
if (level == log_level_t::trace) {
const auto now = chrono::steady_clock::now().time_since_epoch();