From fae9e86a5dacaf1b942f839be19ab92757c703bd Mon Sep 17 00:00:00 2001 From: gabi Date: Wed, 15 Oct 2014 02:00:31 +0300 Subject: [PATCH] bug fixes --- include/c11log/details/flush_helper.h | 2 +- include/c11log/logger.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/c11log/details/flush_helper.h b/include/c11log/details/flush_helper.h index cb05b292..153683ed 100644 --- a/include/c11log/details/flush_helper.h +++ b/include/c11log/details/flush_helper.h @@ -16,7 +16,7 @@ public: file_flush_helper(const file_flush_helper&) = delete; - void write(const log_msg msg, std::ofstream& ofs) + void write(const log_msg& msg, std::ofstream& ofs) { auto buf = msg.formatted.buf(); ofs.write(buf.data(), buf.size()); diff --git a/include/c11log/logger.h b/include/c11log/logger.h index 1abbb652..eb0845d6 100644 --- a/include/c11log/logger.h +++ b/include/c11log/logger.h @@ -114,7 +114,7 @@ inline c11log::logger::logger(const std::string& logger_name, const It& begin, c template inline c11log::details::line_logger c11log::logger::log(level::level_enum lvl, const Args&... args) { - details::line_logger l(this, lvl, true); + details::line_logger l(this, lvl, should_log(lvl)); _variadic_log(l, args...); return l; }