Properly format multiline logs

As a side effect, colouring on Windows should now work
regardless of version
This commit is contained in:
moneromooo-monero 2019-06-22 14:42:48 +00:00
parent 2c171a9b02
commit 32f725d32f
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
8 changed files with 217 additions and 66 deletions

View file

@ -34,7 +34,7 @@
#define MONERO_DEFAULT_LOG_CATEGORY "perf"
#define PERF_LOG_ALWAYS(level, cat, x) \
el::base::Writer(level, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::FileOnlyLog).construct(cat) << x
el::base::Writer(level, el::Color::Default, __FILE__, __LINE__, ELPP_FUNC, el::base::DispatchAction::FileOnlyLog).construct(cat) << x
#define PERF_LOG(level, cat, x) \
do { \
if (ELPP->vRegistry()->allowed(level, cat)) PERF_LOG_ALWAYS(level, cat, x); \