[Box Backup-commit] COMMIT r2208 - box/trunk/lib/common

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Sun, 3 Aug 2008 07:56:16 +0100 (BST)


Author: chris
Date: 2008-08-03 07:56:16 +0100 (Sun, 03 Aug 2008)
New Revision: 2208

Modified:
   box/trunk/lib/common/Logging.cpp
   box/trunk/lib/common/Logging.h
Log:
Remove Windows limitation on Logging that showing PID was not possible.


Modified: box/trunk/lib/common/Logging.cpp
===================================================================
--- box/trunk/lib/common/Logging.cpp	2008-08-03 06:54:40 UTC (rev 2207)
+++ box/trunk/lib/common/Logging.cpp	2008-08-03 06:56:16 UTC (rev 2208)
@@ -227,9 +227,7 @@
 bool Console::sShowTime = false;
 bool Console::sShowTimeMicros = false;
 bool Console::sShowTag = false;
-#ifndef WIN32
 bool Console::sShowPID = false;
-#endif
 std::string Console::sTag;
 
 void Console::SetTag(const std::string& rTag)
@@ -248,12 +246,10 @@
 	sShowTimeMicros = enabled;
 }
 
-#ifndef WIN32
 void Console::SetShowPID(bool enabled)
 {
 	sShowPID = enabled;
 }
-#endif
 
 bool Console::Log(Log::Level level, const std::string& rFile, 
 	int line, std::string& rMessage)
@@ -280,23 +276,19 @@
 
 	if (sShowTag)
 	{
-		#ifndef WIN32
 		if (sShowPID)
 		{
 			buf << "[" << sTag << " " << getpid() << "] ";
 		}
 		else
-		#endif
 		{
 			buf << "[" << sTag << "] ";
 		}
 	}
-	#ifndef WIN32
 	else if (sShowPID)
 	{
 		buf << "[" << getpid() << "] ";
 	}
-	#endif
 
 	if (level <= Log::FATAL)
 	{

Modified: box/trunk/lib/common/Logging.h
===================================================================
--- box/trunk/lib/common/Logging.h	2008-08-03 06:54:40 UTC (rev 2207)
+++ box/trunk/lib/common/Logging.h	2008-08-03 06:56:16 UTC (rev 2208)
@@ -147,9 +147,7 @@
 	static bool sShowTimeMicros;
 	static bool sShowTag;
 	static std::string sTag;
-	#ifndef WIN32
 	static bool sShowPID;
-	#endif
 
 	public:
 	virtual bool Log(Log::Level level, const std::string& rFile, 
@@ -160,9 +158,7 @@
 	static void SetTag(const std::string& rTag);
 	static void SetShowTime(bool enabled);
 	static void SetShowTimeMicros(bool enabled);
-	#ifndef WIN32
 	static void SetShowPID(bool enabled);
-	#endif
 };
 
 // --------------------------------------------------------------------------