Browse Source

[2899] hide the interprocess stuff from public log API more.

- not include the header file, but use a forward declaration
- added a note that setInterprocessSync shouldn't be used by normal apps
JINMEI Tatuya 12 years ago
parent
commit
00cd04ff09
1 changed files with 10 additions and 1 deletions
  1. 10 1
      src/lib/log/logger.h

+ 10 - 1
src/lib/log/logger.h

@@ -24,10 +24,14 @@
 #include <log/logger_level.h>
 #include <log/logger_level.h>
 #include <log/message_types.h>
 #include <log/message_types.h>
 #include <log/log_formatter.h>
 #include <log/log_formatter.h>
-#include <log/interprocess/interprocess_sync.h>
 
 
 namespace isc {
 namespace isc {
 namespace log {
 namespace log {
+namespace internal {
+// Forward declaration to hide implementation details from normal
+// applications.
+class InterprocessSync;
+}
 
 
 /// \page LoggingApi Logging API
 /// \page LoggingApi Logging API
 /// \section LoggingApiOverview Overview
 /// \section LoggingApiOverview Overview
@@ -253,6 +257,11 @@ public:
     /// If this method is called with NULL as the argument, it throws a
     /// If this method is called with NULL as the argument, it throws a
     /// BadInterprocessSync exception.
     /// BadInterprocessSync exception.
     ///
     ///
+    /// \note This method is intended to be used only within this log library
+    /// and its tests.  Normal application shouldn't use it (in fact,
+    /// normal application shouldn't even be able to instantiate
+    /// InterprocessSync objects).
+    ///
     /// \param sync The logger uses this synchronization object for
     /// \param sync The logger uses this synchronization object for
     /// synchronizing output of log messages. It should be deletable and
     /// synchronizing output of log messages. It should be deletable and
     /// the ownership is transferred to the logger. If NULL is passed,
     /// the ownership is transferred to the logger. If NULL is passed,