diff --git a/include/spdlog/details/pattern_formatter_impl.h b/include/spdlog/details/pattern_formatter_impl.h index 3965b831..6a33754c 100644 --- a/include/spdlog/details/pattern_formatter_impl.h +++ b/include/spdlog/details/pattern_formatter_impl.h @@ -619,7 +619,11 @@ inline void spdlog::pattern_formatter::format(details::log_msg& msg) f->format(msg, tm_time); } //write eol +#if defined(SPDLOG_EOL) + msg.formatted << SPDLOG_EOL; +#else msg.formatted << details::os::eol(); +#endif } catch(const fmt::FormatError& e) { diff --git a/include/spdlog/tweakme.h b/include/spdlog/tweakme.h index 84b054b4..8c0ccfaf 100644 --- a/include/spdlog/tweakme.h +++ b/include/spdlog/tweakme.h @@ -63,3 +63,8 @@ // Uncomment to enable usage of wchar_t for file names on Windows. // #define SPDLOG_WCHAR_FILENAMES /////////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +// uncomment the below to override spdlog's default eol +// #define SPDLOG_EOL "\n" +///////////////////////////////////////////////////////////////////////////////