aboutsummaryrefslogtreecommitdiff
path: root/external/easylogging++/easylogging++.cc
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-09-25 14:59:36 -0400
committerRiccardo Spagni <ric@spagni.net>2019-09-25 14:59:37 -0400
commit1fbe7ee8e7b8992a553499c8322d39714df6a17b (patch)
tree004e970656ba0bf7380526dda2795791b651f148 /external/easylogging++/easylogging++.cc
parentMerge pull request #5928 (diff)
parentRevert "easylogging++: ensure it finds boost headers" (diff)
downloadmonero-1fbe7ee8e7b8992a553499c8322d39714df6a17b.tar.xz
Merge pull request #5929
31bf2e25 Revert "easylogging++: ensure it finds boost headers" (moneromooo-monero) 614d6b57 easylogging++: split strings manually (moneromooo-monero)
Diffstat (limited to 'external/easylogging++/easylogging++.cc')
-rw-r--r--external/easylogging++/easylogging++.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/external/easylogging++/easylogging++.cc b/external/easylogging++/easylogging++.cc
index a5a4a64b7..b89fd3daf 100644
--- a/external/easylogging++/easylogging++.cc
+++ b/external/easylogging++/easylogging++.cc
@@ -18,7 +18,6 @@
#include "easylogging++.h"
#include <unistd.h>
-#include <boost/algorithm/string.hpp>
#if defined(AUTO_INITIALIZE_EASYLOGGINGPP)
INITIALIZE_EASYLOGGINGPP
@@ -2438,7 +2437,19 @@ void DefaultLogDispatchCallback::handle(const LogDispatchData* data) {
if (strchr(msg.c_str(), '\n'))
{
std::vector<std::string> v;
- boost::split(v, msg, boost::is_any_of("\n"));
+ const char *s = msg.c_str();
+ while (true)
+ {
+ const char *ptr = strchr(s, '\n');
+ if (!ptr)
+ {
+ if (*s)
+ v.push_back(s);
+ break;
+ }
+ v.push_back(std::string(s, ptr - s));
+ s = ptr + 1;
+ }
for (const std::string &s: v)
{
LogMessage msgline(logmsg->level(), logmsg->color(), logmsg->file(), logmsg->line(), logmsg->func(), logmsg->verboseLevel(), logmsg->logger(), &s);