diff --git a/include/plog/Formatters/TxtFormatter.h b/include/plog/Formatters/TxtFormatter.h index 48e2d50..c9561d0 100644 --- a/include/plog/Formatters/TxtFormatter.h +++ b/include/plog/Formatters/TxtFormatter.h @@ -5,7 +5,7 @@ namespace plog { - template + template class TxtFormatterImpl { public: @@ -25,12 +25,12 @@ namespace plog ss << std::setfill(PLOG_NSTR(' ')) << std::setw(5) << std::left << severityToString(record.getSeverity()) << PLOG_NSTR(" "); ss << PLOG_NSTR("[") << record.getTid() << PLOG_NSTR("] "); ss << PLOG_NSTR("[") << record.getFunc() << PLOG_NSTR("@") << record.getLine() << PLOG_NSTR("] "); - ss << record.getMessage() << PLOG_NSTR("\n"); + ss << record.getMessage() << (characterReturn ? PLOG_NSTR("\r\n") : PLOG_NSTR("\n")); return ss.str(); } }; - class TxtFormatter : public TxtFormatterImpl {}; - class TxtFormatterUtcTime : public TxtFormatterImpl {}; + class TxtFormatter : public TxtFormatterImpl {}; + class TxtFormatterUtcTime : public TxtFormatterImpl {}; }