axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sen...@apache.org
Subject svn commit: r631306 - /webservices/axis2/trunk/c/util/src/log.c
Date Tue, 26 Feb 2008 17:21:30 GMT
Author: senaka
Date: Tue Feb 26 09:21:30 2008
New Revision: 631306

URL: http://svn.apache.org/viewvc?rev=631306&view=rev
Log:
Fixing JIRA Issue AXIS2C-1006

Modified:
    webservices/axis2/trunk/c/util/src/log.c

Modified: webservices/axis2/trunk/c/util/src/log.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/log.c?rev=631306&r1=631305&r2=631306&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/log.c (original)
+++ webservices/axis2/trunk/c/util/src/log.c Tue Feb 26 09:21:30 2008
@@ -527,9 +527,6 @@
     FILE *fd = NULL;
     axutil_thread_mutex_t *mutex = NULL;
 
-    char value[AXIS2_LEN_VALUE + 1];
-    va_list ap;
-
     if (log && format && log->enabled)
     {
         fd = AXUTIL_INTF_TO_IMPL(log)->stream;
@@ -545,11 +542,16 @@
 
         }
 
-        va_start(ap, format);
-        AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap);
-        va_end(ap);
-        axutil_log_impl_write_to_file(log, mutex, AXIS2_LOG_LEVEL_ERROR,
-                                      filename, linenumber, value);
+        if (AXIS2_LOG_LEVEL_ERROR <= log->level)
+        {
+            char value[AXIS2_LEN_VALUE + 1];
+            va_list ap;
+            va_start(ap, format);
+            AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap);
+            va_end(ap);
+            axutil_log_impl_write_to_file(log, mutex, AXIS2_LOG_LEVEL_ERROR,
+                                          filename, linenumber, value);
+        }
     }
     else
 #ifndef AXIS2_NO_LOG_FILE



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message