mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-23 13:47:47 +00:00
Revert "easylogging++: make the logger handle early/late logging"
This reverts commit 7f8bdeb35c
.
This commit is contained in:
parent
58ce16d4d9
commit
7cc27b367e
2 changed files with 4 additions and 17 deletions
12
external/easylogging++/easylogging++.cc
vendored
12
external/easylogging++/easylogging++.cc
vendored
|
@ -2191,17 +2191,6 @@ void VRegistry::setFromArgs(const base::utils::CommandLineArgs* commandLineArgs)
|
||||||
# define ELPP_DEFAULT_LOGGING_FLAGS 0x0
|
# define ELPP_DEFAULT_LOGGING_FLAGS 0x0
|
||||||
#endif // !defined(ELPP_DEFAULT_LOGGING_FLAGS)
|
#endif // !defined(ELPP_DEFAULT_LOGGING_FLAGS)
|
||||||
// Storage
|
// Storage
|
||||||
el::base::type::StoragePointer getresetELPP(bool reset)
|
|
||||||
{
|
|
||||||
static el::base::type::StoragePointer p(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder())));
|
|
||||||
if (reset)
|
|
||||||
p = NULL;
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
el::base::type::StoragePointer el::base::Storage::getELPP()
|
|
||||||
{
|
|
||||||
return getresetELPP(false);
|
|
||||||
}
|
|
||||||
#if ELPP_ASYNC_LOGGING
|
#if ELPP_ASYNC_LOGGING
|
||||||
Storage::Storage(const LogBuilderPtr& defaultLogBuilder, base::IWorker* asyncDispatchWorker) :
|
Storage::Storage(const LogBuilderPtr& defaultLogBuilder, base::IWorker* asyncDispatchWorker) :
|
||||||
#else
|
#else
|
||||||
|
@ -2250,7 +2239,6 @@ Storage::Storage(const LogBuilderPtr& defaultLogBuilder) :
|
||||||
|
|
||||||
Storage::~Storage(void) {
|
Storage::~Storage(void) {
|
||||||
ELPP_INTERNAL_INFO(4, "Destroying storage");
|
ELPP_INTERNAL_INFO(4, "Destroying storage");
|
||||||
getresetELPP(true);
|
|
||||||
#if ELPP_ASYNC_LOGGING
|
#if ELPP_ASYNC_LOGGING
|
||||||
ELPP_INTERNAL_INFO(5, "Replacing log dispatch callback to synchronous");
|
ELPP_INTERNAL_INFO(5, "Replacing log dispatch callback to synchronous");
|
||||||
uninstallLogDispatchCallback<base::AsyncLogDispatchCallback>(std::string("AsyncLogDispatchCallback"));
|
uninstallLogDispatchCallback<base::AsyncLogDispatchCallback>(std::string("AsyncLogDispatchCallback"));
|
||||||
|
|
9
external/easylogging++/easylogging++.h
vendored
9
external/easylogging++/easylogging++.h
vendored
|
@ -2734,8 +2734,6 @@ class Storage : base::NoCopy, public base::threading::ThreadSafe {
|
||||||
return it->second;
|
return it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
static el::base::type::StoragePointer getELPP();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
base::RegisteredHitCounters* m_registeredHitCounters;
|
base::RegisteredHitCounters* m_registeredHitCounters;
|
||||||
base::RegisteredLoggers* m_registeredLoggers;
|
base::RegisteredLoggers* m_registeredLoggers;
|
||||||
|
@ -2770,7 +2768,7 @@ class Storage : base::NoCopy, public base::threading::ThreadSafe {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
extern ELPP_EXPORT base::type::StoragePointer elStorage;
|
extern ELPP_EXPORT base::type::StoragePointer elStorage;
|
||||||
#define ELPP el::base::Storage::getELPP()
|
#define ELPP el::base::elStorage
|
||||||
class DefaultLogDispatchCallback : public LogDispatchCallback {
|
class DefaultLogDispatchCallback : public LogDispatchCallback {
|
||||||
protected:
|
protected:
|
||||||
void handle(const LogDispatchData* data);
|
void handle(const LogDispatchData* data);
|
||||||
|
@ -4613,9 +4611,10 @@ el::base::debug::CrashHandler elCrashHandler(ELPP_USE_DEF_CRASH_HANDLER); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ELPP_ASYNC_LOGGING
|
#if ELPP_ASYNC_LOGGING
|
||||||
# define INITIALIZE_EASYLOGGINGPP ELPP_INIT_EASYLOGGINGPP(NULL)
|
# define INITIALIZE_EASYLOGGINGPP ELPP_INIT_EASYLOGGINGPP(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder()),\
|
||||||
|
new el::base::AsyncDispatchWorker()))
|
||||||
#else
|
#else
|
||||||
# define INITIALIZE_EASYLOGGINGPP ELPP_INIT_EASYLOGGINGPP(NULL)
|
# define INITIALIZE_EASYLOGGINGPP ELPP_INIT_EASYLOGGINGPP(new el::base::Storage(el::LogBuilderPtr(new el::base::DefaultLogBuilder())))
|
||||||
#endif // ELPP_ASYNC_LOGGING
|
#endif // ELPP_ASYNC_LOGGING
|
||||||
#define INITIALIZE_NULL_EASYLOGGINGPP \
|
#define INITIALIZE_NULL_EASYLOGGINGPP \
|
||||||
namespace el {\
|
namespace el {\
|
||||||
|
|
Loading…
Reference in a new issue