mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
tweaked debug logging in i2pd_qt
This commit is contained in:
parent
e42efec220
commit
b5aa67b491
@ -11,6 +11,8 @@
|
||||
#include <QMutexLocker>
|
||||
#include <QThread>
|
||||
|
||||
//#define DEBUG_WITH_DEFAULT_LOGGING (1)
|
||||
|
||||
namespace i2p
|
||||
{
|
||||
namespace qt
|
||||
@ -151,10 +153,16 @@ namespace qt
|
||||
int result;
|
||||
|
||||
{
|
||||
std::shared_ptr<std::iostream> logstreamptr=std::make_shared<std::stringstream>();
|
||||
std::shared_ptr<std::iostream> logstreamptr=
|
||||
#ifdef DEBUG_WITH_DEFAULT_LOGGING
|
||||
nullptr
|
||||
#else
|
||||
std::make_shared<std::stringstream>()
|
||||
#endif
|
||||
;
|
||||
//TODO move daemon init deinit to a bg thread
|
||||
DaemonQTImpl daemon;
|
||||
(*logstreamptr) << "Initialising the daemon..." << std::endl;
|
||||
if(logstreamptr) (*logstreamptr) << "Initialising the daemon..." << std::endl;
|
||||
bool daemonInitSuccess = daemon.init(argc, argv, logstreamptr);
|
||||
if(!daemonInitSuccess)
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ namespace logviewer {
|
||||
|
||||
QString Worker::pollAndShootATimerForInfiniteRetries() {
|
||||
std::shared_ptr<std::iostream> logStream=logViewerManager.getLogStream();
|
||||
assert(logStream!=nullptr);
|
||||
if(!logStream)return "";
|
||||
std::streamsize MAX_SZ=64*1024;
|
||||
char*buf=(char*)malloc(MAX_SZ*sizeof(char));
|
||||
if(buf==nullptr)return "";
|
||||
|
Loading…
Reference in New Issue
Block a user