git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2583 19bc5d8c-e614-43d4-8b26-e1612bc8e597
diff --git a/CommonLibs/Logger.h b/CommonLibs/Logger.h
index b9fd5ea..35101d8 100644
--- a/CommonLibs/Logger.h
+++ b/CommonLibs/Logger.h
@@ -40,10 +40,18 @@
 #define _LOG(level) \
 	Log(LOG_##level).get() << pthread_self() \
 	<< " " __FILE__  ":"  << __LINE__ << ":" << __FUNCTION__ << ": "
+
+#ifdef NDEBUG
+#define LOG(wLevel) \
+	if (LOG_##wLevel!=LOG_DEBUG && gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel)
+#else
 #define LOG(wLevel) \
 	if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel)
+#endif
+
+
 #define OBJLOG(wLevel) \
-	if (gGetLoggingLevel(__FILE__)>=LOG_##wLevel) _LOG(wLevel) << "obj: " << this << ' '
+	LOG(wLevel) << "obj: " << this << ' '
 
 #define LOG_ASSERT(x) { if (!(x)) LOG(EMERG) << "assertion " #x " failed"; } assert(x);
 
@@ -66,13 +74,16 @@
 
 	std::ostringstream mStream;		///< This is where we buffer up the log entry.
 	int mPriority;					///< Priority of current repot.
+	bool mDummyInit;
 
 	public:
 
 	Log(int wPriority)
-		:mPriority(wPriority)
+		:mPriority(wPriority), mDummyInit(false)
 	{ }
 
+	Log(const char* name, const char* level=NULL, int facility=LOG_USER);
+
 	// Most of the work is in the desctructor.
 	/** The destructor actually generates the log entry. */
 	~Log();