summaryrefslogtreecommitdiff
path: root/trunk/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl')
-rw-r--r--trunk/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl51
1 files changed, 51 insertions, 0 deletions
diff --git a/trunk/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl b/trunk/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl
new file mode 100644
index 00000000000..120a88f6557
--- /dev/null
+++ b/trunk/TAO/orbsvcs/orbsvcs/FtRtEvent/Utils/Log.inl
@@ -0,0 +1,51 @@
+// -*- C++ -*-
+//
+// $Id$
+
+TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+
+namespace TAO_FTRTEC {
+#ifndef NDEBUG
+ ACE_INLINE
+ void Log::level(unsigned int log_level)
+ {
+ log_level_ = log_level;
+ }
+
+ ACE_INLINE
+ unsigned int Log::level()
+ {
+ return log_level_;
+ }
+
+ ACE_INLINE
+ void Log::hexdump(unsigned int level, const char* buf, size_t len, const char* msg)
+ {
+ if (Log::log_level_ >= level)
+ ACE_HEX_DUMP((LM_DEBUG, buf, len, msg));
+ }
+#else // NDEBUG
+ ACE_INLINE
+ Log::Log (unsigned int, const ACE_TCHAR*, ...)
+ {
+ }
+
+ ACE_INLINE
+ void Log::level(unsigned int )
+ {
+ }
+
+ ACE_INLINE
+ unsigned int Log::level()
+ {
+ return 0;
+ }
+
+ ACE_INLINE
+ void Log::hexdump(unsigned int, const char*, size_t, const char*)
+ {
+ }
+#endif
+}
+
+TAO_END_VERSIONED_NAMESPACE_DECL