mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
Major cleanup of Retroshare Logging - aimed at enabling proper UDP testing.
* Switched off most of std::cerr output. (expect UPnP) * moved pqi/pqidebug to util/rsdebug to allow greater usage. * added Mutexes to logging. * Downgraded many log messages to DEBUG. * New Log messages for connections, dht and udp code. * Added check for bad UDP socket. * Added check for non-firewalled scenario. * Increased Storage period from 1 Month to 6 Months for Links & Blog. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@644 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
afeb93d0f3
commit
d36b15d526
33 changed files with 867 additions and 346 deletions
|
@ -30,7 +30,7 @@
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "pqi/pqidebug.h"
|
||||
#include "util/rsdebug.h"
|
||||
const int p3facemsgzone = 11453;
|
||||
|
||||
#include <sys/time.h>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "pqi/pqidebug.h"
|
||||
#include "util/rsdebug.h"
|
||||
const int p3facefilezone = 11452;
|
||||
|
||||
#include <sys/time.h>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "pqi/pqidebug.h"
|
||||
#include "util/rsdebug.h"
|
||||
const int p3facemsgzone = 11453;
|
||||
|
||||
#include <sys/time.h>
|
||||
|
@ -57,7 +57,7 @@ int RsServer::SetInChat(std::string id, bool in) /* friend : cha
|
|||
/* so we send this.... */
|
||||
lockRsCore(); /* LOCK */
|
||||
|
||||
std::cerr << "Set InChat(" << id << ") to " << (in ? "True" : "False") << std::endl;
|
||||
//std::cerr << "Set InChat(" << id << ") to " << (in ? "True" : "False") << std::endl;
|
||||
std::list<std::string>::iterator it;
|
||||
it = std::find(mInChatList.begin(), mInChatList.end(), id);
|
||||
if (it == mInChatList.end())
|
||||
|
@ -98,7 +98,7 @@ int RsServer::SetInMsg(std::string id, bool in) /* friend : msgs
|
|||
/* so we send this.... */
|
||||
lockRsCore(); /* LOCK */
|
||||
|
||||
std::cerr << "Set InMsg(" << id << ") to " << (in ? "True" : "False") << std::endl;
|
||||
//std::cerr << "Set InMsg(" << id << ") to " << (in ? "True" : "False") << std::endl;
|
||||
std::list<std::string>::iterator it;
|
||||
it = std::find(mInMsgList.begin(), mInMsgList.end(), id);
|
||||
if (it == mInMsgList.end())
|
||||
|
@ -207,7 +207,7 @@ int RsServer::SetInRecommend(std::string id, bool in) /* file : recom
|
|||
{
|
||||
/* set flag */
|
||||
it -> inRecommend = in;
|
||||
std::cerr << "Set InRecommend (" << id << ") to " << (in ? "True" : "False") << std::endl;
|
||||
//std::cerr << "Set InRecommend (" << id << ") to " << (in ? "True" : "False") << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "pqi/pqidebug.h"
|
||||
#include "util/rsdebug.h"
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
|
|
@ -89,7 +89,7 @@ void intNotifyChangeCert(RsCertId &id)
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "pqi/pqidebug.h"
|
||||
#include "util/rsdebug.h"
|
||||
const int fltksrvrzone = 25915;
|
||||
|
||||
#include <sys/time.h>
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
#include "pqi/pqisslpersongrp.h"
|
||||
#include "pqi/pqiloopback.h"
|
||||
#include "pqi/p3cfgmgr.h"
|
||||
#include "pqi/pqidebug.h"
|
||||
|
||||
#include "util/rsdebug.h"
|
||||
#include "util/rsdir.h"
|
||||
|
||||
#include "upnp/upnphandler.h"
|
||||
|
@ -591,7 +591,7 @@ int RsServer::StartupRetroShare(RsInit *config)
|
|||
|
||||
mRanking = new p3Ranking(mConnMgr, RS_SERVICE_TYPE_RANK, /* declaration of cache enable service rank */
|
||||
mCacheStrapper, mCacheTransfer,
|
||||
localcachedir, remotecachedir, 3600 * 24 * 30);
|
||||
localcachedir, remotecachedir, 3600 * 24 * 30 * 6); // 6 Months
|
||||
|
||||
CachePair cp(mRanking, mRanking, CacheId(RS_SERVICE_TYPE_RANK, 0));
|
||||
mCacheStrapper -> addCachePair(cp); /* end of declaration */
|
||||
|
@ -609,7 +609,7 @@ int RsServer::StartupRetroShare(RsInit *config)
|
|||
|
||||
mQblog = new p3Qblog(mConnMgr, RS_SERVICE_TYPE_QBLOG, /* ...then for Qblog */
|
||||
mCacheStrapper, mCacheTransfer,
|
||||
localcachedir, remotecachedir, 3600 * 24 * 30);
|
||||
localcachedir, remotecachedir, 3600 * 24 * 30 * 6); // 6 Months
|
||||
|
||||
CachePair cp3(mQblog, mQblog, CacheId(RS_SERVICE_TYPE_QBLOG, 0));
|
||||
mCacheStrapper -> addCachePair(cp3);
|
||||
|
|
|
@ -29,14 +29,14 @@
|
|||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include "pqi/pqidebug.h"
|
||||
#include "util/rsdir.h"
|
||||
#include "util/rsdebug.h"
|
||||
const int p3facemsgzone = 11453;
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "rsiface/rstypes.h"
|
||||
#include "util/rsdir.h"
|
||||
#include "rsserver/p3msgs.h"
|
||||
|
||||
#include "services/p3msgservice.h"
|
||||
|
@ -74,8 +74,8 @@ bool p3Msgs::MessageSend(MessageInfo &info)
|
|||
/****************************************/
|
||||
bool p3Msgs::MessageDelete(std::string mid)
|
||||
{
|
||||
std::cerr << "p3Msgs::MessageDelete() ";
|
||||
std::cerr << "mid: " << mid << std::endl;
|
||||
//std::cerr << "p3Msgs::MessageDelete() ";
|
||||
//std::cerr << "mid: " << mid << std::endl;
|
||||
|
||||
mMsgSrv -> removeMsgId(mid);
|
||||
|
||||
|
@ -84,8 +84,8 @@ bool p3Msgs::MessageDelete(std::string mid)
|
|||
|
||||
bool p3Msgs::MessageRead(std::string mid)
|
||||
{
|
||||
std::cerr << "p3Msgs::MessageRead() ";
|
||||
std::cerr << "mid: " << mid << std::endl;
|
||||
//std::cerr << "p3Msgs::MessageRead() ";
|
||||
//std::cerr << "mid: " << mid << std::endl;
|
||||
|
||||
mMsgSrv -> markMsgIdRead(mid);
|
||||
|
||||
|
@ -150,14 +150,14 @@ void p3Msgs::initRsChatInfo(RsChatItem *c, ChatInfo &i)
|
|||
i.msg = c -> message;
|
||||
if (c -> chatFlags & RS_CHAT_FLAG_PRIVATE)
|
||||
{
|
||||
std::cerr << "RsServer::initRsChatInfo() Chat Private!!!";
|
||||
i.chatflags = RS_CHAT_PRIVATE;
|
||||
//std::cerr << "RsServer::initRsChatInfo() Chat Private!!!";
|
||||
}
|
||||
else
|
||||
{
|
||||
i.chatflags = RS_CHAT_PUBLIC;
|
||||
std::cerr << "RsServer::initRsChatInfo() Chat Public!!!";
|
||||
//std::cerr << "RsServer::initRsChatInfo() Chat Public!!!";
|
||||
}
|
||||
std::cerr << std::endl;
|
||||
//std::cerr << std::endl;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue