axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r368303 - in /webservices/axis2/trunk/c: include/axis2_log.h modules/util/log.c
Date Thu, 12 Jan 2006 07:53:21 GMT
Author: samisa
Date: Wed Jan 11 23:53:14 2006
New Revision: 368303

URL: http://svn.apache.org/viewcvs?rev=368303&view=rev
Log:
Changed the logging API to include log level. Also as there is no point in logging binary
stuff, changed the 
API to only take strings

Modified:
    webservices/axis2/trunk/c/include/axis2_log.h
    webservices/axis2/trunk/c/modules/util/log.c

Modified: webservices/axis2/trunk/c/include/axis2_log.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_log.h?rev=368303&r1=368302&r2=368303&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_log.h (original)
+++ webservices/axis2/trunk/c/include/axis2_log.h Wed Jan 11 23:53:14 2006
@@ -71,7 +71,7 @@
         * @param size size of the buffer to be written to log
         * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE
         */
-        axis2_status_t (AXIS2_CALL *write) (const void *buffer, size_t count);
+        axis2_status_t (AXIS2_CALL *write) (axis2_char_t *buffer, axis2_log_levels_t level);
     } axis2_log_ops_t;
 
   /** 
@@ -91,7 +91,7 @@
  
 
 #define AXIS2_LOG_FREE(log) ((log->ops)->free(log))
-#define AXIS2_LOG_WRITE(log, buffer, count) ((log)->ops->write(buffer, count))
+#define AXIS2_LOG_WRITE(log, buffer, level) ((log)->ops->write(buffer, level))
 
 /** @} */
     

Modified: webservices/axis2/trunk/c/modules/util/log.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/log.c?rev=368303&r1=368302&r2=368303&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/log.c (original)
+++ webservices/axis2/trunk/c/modules/util/log.c Wed Jan 11 23:53:14 2006
@@ -31,7 +31,7 @@
     return 0;
 }
 
-axis2_status_t AXIS2_CALL axis2_log_impl_write (const void *buffer, size_t count);
+axis2_status_t AXIS2_CALL axis2_log_impl_write (axis2_char_t *buffer, axis2_log_levels_t
level);
 
 AXIS2_DECLARE(axis2_log_t *)
 axis2_log_create (axis2_allocator_t * allocator, axis2_log_ops_t * ops)
@@ -66,15 +66,13 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_log_impl_write (const void *buffer, size_t count)
+axis2_log_impl_write (axis2_char_t *buffer, axis2_log_levels_t level)
 {
-    int i;
     if (!buffer)
         return -1;
 
-    i = 0;
-    for (i = 0; i < count; i++)
-        fprintf (stderr, "%c", ((axis2_char_t *) buffer)[i]);
+    fprintf (stderr, "%s", buffer);
     printf ("\n");
     return 0;
 }
+



Mime
View raw message