Browse Source

[1704] Add documentation for setInterprocessSync()

Mukund Sivaraman 13 years ago
parent
commit
1d5bd47c50
2 changed files with 16 additions and 2 deletions
  1. 8 1
      src/lib/log/logger.h
  2. 8 1
      src/lib/log/logger_impl.h

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

@@ -240,8 +240,15 @@ public:
 
     /// \brief Replace the interprocess synchronization object
     ///
+    /// This method is exception-free. If this method is called with
+    /// NULL as the argument, it does nothing and the old sync object is
+    /// used as before.
+    ///
     /// \param sync The logger uses this synchronization object for
-    /// synchronizing output of log messages.
+    /// synchronizing output of log messages. If NULL is passed, the old
+    /// synchronization object is used as before. When a non-NULL sync
+    /// object is passed, it should be deletable and the ownership is
+    /// transferred to the logger.
     void setInterprocessSync(isc::util::InterprocessSync* sync);
 
     /// \brief Equality

+ 8 - 1
src/lib/log/logger_impl.h

@@ -171,8 +171,15 @@ public:
 
     /// \brief Replace the interprocess synchronization object
     ///
+    /// This method is exception-free. If this method is called with
+    /// NULL as the argument, it does nothing and the old sync object is
+    /// used as before.
+    ///
     /// \param sync The logger uses this synchronization object for
-    /// synchronizing output of log messages.
+    /// synchronizing output of log messages. If NULL is passed, the old
+    /// synchronization object is used as before. When a non-NULL sync
+    /// object is passed, it should be deletable and the ownership is
+    /// transferred to the logger implementation.
     void setInterprocessSync(isc::util::InterprocessSync* sync);
 
     /// \brief Equality