changeset 114:16557858a60c

8074479: change JAVACALL_REPORT_ERROR and _CRIT logging. review GPIO logging levels Summary: printouts rework Reviewed-by: snazarki Contributed-by: alexey.karaksin@oracle.com
author snazarki
date Tue, 10 Mar 2015 13:40:37 +0400
parents 3e046a6fbeec
children c9392253b499
files src/se/native/com/oracle/dio/javacall_logging.h
diffstat 1 files changed, 15 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/se/native/com/oracle/dio/javacall_logging.h	Wed Feb 25 16:47:31 2015 -0500
+++ b/src/se/native/com/oracle/dio/javacall_logging.h	Tue Mar 10 13:40:37 2015 +0400
@@ -34,8 +34,6 @@
  */
 
 #include "javacall_defs.h"
-#include <errno.h>
-
 
 #ifdef __cplusplus
 extern "C" {
@@ -380,21 +378,21 @@
  * @{
  */
 #if JAVACALL_REPORT_LEVEL <= JAVACALL_LOGGING_ERROR
-#define JAVACALL_REPORT_ERROR(ch, msg) javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg ". %s", strerror(errno))
-#define JAVACALL_REPORT_ERROR1(ch, msg, a1) javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg  ". %s", a1, strerror(errno))
+#define JAVACALL_REPORT_ERROR(ch, msg) javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg)
+#define JAVACALL_REPORT_ERROR1(ch, msg, a1) javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg, a1)
 #define JAVACALL_REPORT_ERROR2(ch, msg, a1, a2) \
-  javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg ". %s", a1, a2, strerror(errno))
+  javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg, a1, a2)
 #define JAVACALL_REPORT_ERROR3(ch, msg, a1, a2, a3) \
-  javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg ". %s", a1, a2, a3, strerror(errno))
+  javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg, a1, a2, a3)
 #define JAVACALL_REPORT_ERROR4(ch, msg, a1, a2, a3, a4) \
-  javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg ". %s", a1, a2, a3, a4, strerror(errno))
+  javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg, a1, a2, a3, a4)
 #define JAVACALL_REPORT_ERROR5(ch, msg, a1, a2, a3, a4, a5) \
-  javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg ". %s", a1, a2, a3, a4, a5, strerror(errno))
+  javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg, a1, a2, a3, a4, a5)
 #define JAVACALL_REPORT_ERROR6(ch, msg, a1, a2, a3, a4, a5, a6) \
-  javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg ". %s", a1, a2, a3, a4, a5, a6, strerror(errno))
+  javacall_logging_printf(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, msg, a1, a2, a3, a4, a5, a6)
 
 #define JAVACALL_REPORT_UTF16_ERROR(ch, prefix, msg, len) \
-    javacall_logging_utf16_print(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, prefix, msg ". %s", len, strerror(errno))
+    javacall_logging_utf16_print(JAVACALL_LOGGING_ERROR, ch, __FILE__, __LINE__, prefix, msg, len)
 #else
 #define JAVACALL_REPORT_ERROR(ch, msg)
 #define JAVACALL_REPORT_ERROR1(ch, msg, a1)
@@ -416,19 +414,19 @@
  * @{
  */
 #if JAVACALL_REPORT_LEVEL <= JAVACALL_LOGGING_CRITICAL
-#define JAVACALL_REPORT_CRIT(ch, msg) javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, msg ". %s", strerror(errno))
-#define JAVACALL_REPORT_CRIT1(ch, msg, a1) javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch,__FILE__, __LINE__, msg ". %s", a1, strerror(errno))
+#define JAVACALL_REPORT_CRIT(ch, msg) javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, msg)
+#define JAVACALL_REPORT_CRIT1(ch, msg, a1) javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch,__FILE__, __LINE__, msg, a1)
 #define JAVACALL_REPORT_CRIT2(ch, msg, a1, a2) \
-  javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, msg ". %s", a1, a2, strerror(errno))
+  javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, msg, a1, a2)
 #define JAVACALL_REPORT_CRIT3(ch, msg, a1, a2, a3) \
-  javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, msg ". %s", a1, a2, a3, strerror(errno))
+  javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, msg, a1, a2, a3)
 #define JAVACALL_REPORT_CRIT4(ch, msg, a1, a2, a3, a4) \
-  javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, msg ". %s", a1, a2, a3, a4, strerror(errno))
+  javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, msg, a1, a2, a3, a4)
 #define JAVACALL_REPORT_CRIT5(ch, msg, a1, a2, a3, a4, a5) \
-  javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, msg ". %s", a1, a2, a3, a4, a5, strerror(errno))
+  javacall_logging_printf(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, msg, a1, a2, a3, a4, a5)
 
 #define JAVACALL_REPORT_UTF16_CRIT(ch, prefix, msg, len) \
-    javacall_logging_utf16_print(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, prefix, msg ". %s", len, strerror(errno))
+    javacall_logging_utf16_print(JAVACALL_LOGGING_CRITICAL, ch, __FILE__, __LINE__, prefix, msg, len)
 #else
 #define JAVACALL_REPORT_CRIT(ch, msg)
 #define JAVACALL_REPORT_CRIT1(ch, msg, a1)