mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 00:25:16 -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
73
libretroshare/src/util/rsdebug.h
Normal file
73
libretroshare/src/util/rsdebug.h
Normal file
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
* libretroshare/src/util: rsdebug.h
|
||||
*
|
||||
* Debug interface for RetroShare.
|
||||
*
|
||||
* Copyright 2004-2008 by Robert Fernie.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License Version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA.
|
||||
*
|
||||
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* Moved from pqi/ to util/ so it can be used more generally.
|
||||
*/
|
||||
|
||||
#ifndef RS_LOG_DEBUG_H
|
||||
#define RS_LOG_DEBUG_H
|
||||
|
||||
|
||||
|
||||
#define RSL_NONE -1
|
||||
#define RSL_ALERT 1
|
||||
#define RSL_ERROR 3
|
||||
#define RSL_WARNING 5
|
||||
#define RSL_DEBUG_ALERT 6
|
||||
#define RSL_DEBUG_BASIC 8
|
||||
#define RSL_DEBUG_ALL 10
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
int setDebugCrashMode(const char *cfile);
|
||||
int clearDebugCrashLog();
|
||||
|
||||
int setDebugFile(const char *fname);
|
||||
int setOutputLevel(int lvl);
|
||||
int setZoneLevel(int lvl, int zone);
|
||||
int rslog(unsigned int lvl, int zone, std::string msg);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* retaining old #DEFINES and functions for backward compatibility.
|
||||
*/
|
||||
|
||||
//int pqioutput(unsigned int lvl, int zone, std::string msg);
|
||||
#define pqioutput rslog
|
||||
|
||||
#define PQL_NONE RSL_NONE
|
||||
#define PQL_ALERT RSL_ALERT
|
||||
#define PQL_ERROR RSL_ERROR
|
||||
#define PQL_WARNING RSL_WARNING
|
||||
#define PQL_DEBUG_ALERT RSL_DEBUG_ALERT
|
||||
#define PQL_DEBUG_BASIC RSL_DEBUG_BASIC
|
||||
#define PQL_DEBUG_ALL RSL_DEBUG_ALL
|
||||
|
||||
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue