You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/05/18 21:08:09 UTC

svn commit: r776055 [2/2] - in /activemq/activemq-cpp/trunk/activemq-cpp: ./ src/main/activemq/cmsutil/ src/main/activemq/exceptions/ src/main/decaf/net/ src/main/decaf/security/ src/main/decaf/util/concurrent/ src/main/decaf/util/logging/

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.h?rev=776055&r1=776054&r2=776055&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/Logger.h Mon May 18 19:08:09 2009
@@ -33,8 +33,7 @@
     class Handler;
     class Filter;
 
-    class DECAF_API Logger
-    {
+    class DECAF_API Logger {
     private:
 
         // The name of this Logger
@@ -89,7 +88,7 @@
          * that essentially act as default handlers for all loggers.
          *
          * @param handler A Logging Handler
-         * #throws IllegalArgumentException
+         * @throws IllegalArgumentException
          */
         virtual void addHandler( Handler* handler )
             throw ( lang::exceptions::IllegalArgumentException );
@@ -274,7 +273,7 @@
          * Handler objects.
          * @param file the file name where the log was generated
          * @param line the line number where the log was generated
-         * @param fnctionName name of the function that logged this
+         * @param functionName name of the function that logged this
          * @param message the message to log
          */
         virtual void fatal( const std::string& file,
@@ -290,11 +289,11 @@
          * Handler objects.
          * @param file the file name where the log was generated
          * @param line the line number where the log was generated
-         * @param fnctionName name of the function that logged this
+         * @param functionName name of the function that logged this
          * @param message the message to log
         virtual void throwing( const std::string& file,
                                const int line,
-                               const std::string fnctionName,
+                               const std::string functionName,
                                const std::string& message );
          */
 
@@ -337,7 +336,7 @@
          * @param level the Level to log at
          * @param file the message to log
          * @param line the line in the file
-         * @param variable length arguement to format the message string.
+         * @param ... variable length argument to format the message string.
          */
         virtual void log( Level level,
                           const std::string& file,
@@ -353,9 +352,10 @@
          * property, rather than the LogRecord parameters property. Thus is
          * it processed specially by output Formatters and is not treated
          * as a formatting parameter to the LogRecord message property.
-         * @param level the Level to log at
-         * @param file File that the message was logged in
+         * @param level the Level to log at.
+         * @param file File that the message was logged in.
          * @param line the line number where the message was logged at.
+         * @param message the message to log.
          * @param ex the Exception to log
          */
         virtual void log( Level level,

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.h?rev=776055&r1=776054&r2=776055&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/logging/StreamHandler.h Mon May 18 19:08:09 2009
@@ -22,7 +22,7 @@
 #include <decaf/util/logging/Formatter.h>
 #include <decaf/util/logging/Filter.h>
 #include <decaf/io/OutputStream.h>
-#include <decaf/kang/exceptions/NullPointerException.h>
+#include <decaf/lang/exceptions/NullPointerException.h>
 #include <decaf/lang/exceptions/InvalidStateException.h>
 #include <decaf/util/concurrent/Concurrent.h>
 #include <decaf/util/Config.h>
@@ -59,24 +59,20 @@
         /**
          * Create a StreamHandler, with no current output stream.
          */
-        StreamHandler( io::OutputStream* stream, Formatter* formatter )
-        {
+        StreamHandler( io::OutputStream* stream, Formatter* formatter ) {
             this->stream = stream;
             this->formatter = formatter;
             this->filter = NULL;
 
-           this->level = Level::Fatal;  // We take everything by default
+            this->level = Level::Fatal;  // We take everything by default
         }
 
-        /**
-         * Destructor
-         */
         virtual ~StreamHandler() {
             try {
                 this->close();
             }
-            AMQ_CATCH_NOTHROW( lang::Exception)
-            AMQ_CATCALL_NOTHROW()
+            DECAF_CATCH_NOTHROW( lang::Exception)
+            DECAF_CATCHALL_NOTHROW()
         }
 
         /**
@@ -106,7 +102,9 @@
 
         /**
          * Publish the Log Record to this Handler
-         * @param The Log Record to Publish
+         *
+         * @param record
+         *      The <code>LogRecord</code> to Publish
          */
         virtual void publish( const LogRecord& record ) {
 
@@ -129,19 +127,20 @@
                     }
                 }
             }
-            AMQ_CATCH_RETHROW( lang::Exception )
-            AMQ_CATCHALL_THROW( lang::Exception )
+            DECAF_CATCH_RETHROW( lang::Exception )
+            DECAF_CATCHALL_THROW( lang::Exception )
         }
 
         /**
          * Check if this Handler would actually log a given LogRecord.
          * <p>
-         * @param <code>LogRecord</code> to check
+         * @param record
+         *      <code>LogRecord</code> to check
          */
         virtual void isLoggable( const LogRecord& record ) {
 
             if( filter ) {
-                // Allow for some filtering to occurr
+                // Allow for some filtering to occur
                 return filter->isLoggable( record );
             }
 
@@ -152,7 +151,8 @@
 
         /**
          * Sets the Filter that this Handler uses to filter Log Records
-         * @param <code>Filter</code> derived instance
+         * @param filter
+         *      <code>Filter</code> derived instance
          */
         virtual void setFilter( const Filter* filter ){
             this->filter = filter;
@@ -160,7 +160,7 @@
 
         /**
          * Gets the Filter that this Handler uses to filter Log Records
-         * @param <code>Filter</code> derived instance
+         * @return <code>Filter</code> derived instance
          */
         virtual const Filter* getFilter(){
             return filter;
@@ -170,9 +170,11 @@
          * Set the log level specifying which message levels will be logged
          * by this Handler.
          * <p>
-         * The intention is to allow developers to turn on voluminous logging,
+         * The intention is to allow developers to turn on verbose logging,
          * but to limit the messages that are sent to certain Handlers.
-         * @param Level enumeration value
+         *
+         * @param level
+         *      Level enumeration value
          */
         virtual void setLevel( Level level ){
             this->level = level;
@@ -181,7 +183,7 @@
         /**
          * Get the log level specifying which message levels will be logged
          * by this Handler.
-         * @param Level enumeration value
+         * @return Currently set Level enumeration value
          */
         virtual Level getLevel(){
             return level;
@@ -189,7 +191,8 @@
 
         /**
          * Sets the <code>Formatter</code> used by this Handler
-         * @param <code>Filter</code> derived instance
+         * @param formatter
+         *      <code>Formatter</code> derived instance
          */
         virtual void setFormatter( const Formatter* formatter ){
             this->formatter = formatter;
@@ -197,7 +200,7 @@
 
         /**
          * Gets the <code>Formatter</code> used by this Handler
-         * @param <code>Filter</code> derived instance
+         * @return currently configured <code>Formatter</code> derived instance
          */
         virtual const Formatter* getFormatter(){
             return formatter;
@@ -205,9 +208,9 @@
 
         /**
          * Gets the output Stream that this Handler is using
-         * @return OuputStream pointer
+         * @return OuputStream pointer used by this handler.
          */
-        virtual io::OutputStream* getOutputStream() const(
+        virtual io::OutputStream* getOutputStream() const{
             return stream;
         }