mirror of
https://github.com/monero-project/monero.git
synced 2024-12-27 17:29:25 -05:00
Merge pull request #5929
31bf2e25
Revert "easylogging++: ensure it finds boost headers" (moneromooo-monero)614d6b57
easylogging++: split strings manually (moneromooo-monero)
This commit is contained in:
commit
1fbe7ee8e7
@ -451,6 +451,7 @@ ExternalProject_Add(generate_translations_header
|
||||
CMAKE_ARGS -DLRELEASE_PATH=${LRELEASE_PATH}
|
||||
INSTALL_COMMAND cmake -E echo "")
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}/translations")
|
||||
add_subdirectory(external)
|
||||
|
||||
# Final setup for libunbound
|
||||
include_directories(${UNBOUND_INCLUDE})
|
||||
@ -1023,5 +1024,3 @@ if (iwyu_tool_path AND PYTHONINTERP_FOUND)
|
||||
VERBATIM
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectory(external)
|
||||
|
1
external/easylogging++/CMakeLists.txt
vendored
1
external/easylogging++/CMakeLists.txt
vendored
@ -40,7 +40,6 @@ add_library(easylogging
|
||||
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
|
||||
target_link_libraries(easylogging
|
||||
PRIVATE
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
|
15
external/easylogging++/easylogging++.cc
vendored
15
external/easylogging++/easylogging++.cc
vendored
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user