summaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/CMethodBindingEmitter.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-03-31 16:08:54 +0200
committerMichael Bien <[email protected]>2010-03-31 16:08:54 +0200
commit2fe517b9a2e1a680b50c7e1273897495800c5350 (patch)
treec39ed5cbb48d49a34f024437e5dbfe76ff29c447 /src/java/com/sun/gluegen/CMethodBindingEmitter.java
parentf76e3bb1cff43d35b6884c17418ea20cd4ed5e22 (diff)
implemented better logging using java.util.logging.
Diffstat (limited to 'src/java/com/sun/gluegen/CMethodBindingEmitter.java')
-rw-r--r--src/java/com/sun/gluegen/CMethodBindingEmitter.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/java/com/sun/gluegen/CMethodBindingEmitter.java b/src/java/com/sun/gluegen/CMethodBindingEmitter.java
index 022df39..ef5d0e9 100644
--- a/src/java/com/sun/gluegen/CMethodBindingEmitter.java
+++ b/src/java/com/sun/gluegen/CMethodBindingEmitter.java
@@ -44,12 +44,15 @@ import java.io.*;
import java.text.MessageFormat;
import com.sun.gluegen.cgram.types.*;
+import java.util.logging.Logger;
+
+import static java.util.logging.Level.*;
/** Emits the C-side component of the Java<->C JNI binding. */
-public class CMethodBindingEmitter extends FunctionEmitter
-{
- protected static final CommentEmitter defaultCommentEmitter =
- new DefaultCommentEmitter();
+public class CMethodBindingEmitter extends FunctionEmitter {
+
+ protected static final Logger LOG = Logger.getLogger(CMethodBindingEmitter.class.getPackage().getName());
+ protected static final CommentEmitter defaultCommentEmitter = new DefaultCommentEmitter();
protected static final String arrayResLength = "_array_res_length";
protected static final String arrayRes = "_array_res";
@@ -1006,13 +1009,13 @@ public class CMethodBindingEmitter extends FunctionEmitter
}
}
writer.print("sizeof(" + cReturnType.getName() + ")");
- System.err.println(
- "WARNING: No capacity specified for java.nio.Buffer return " +
+ LOG.warning(
+ "No capacity specified for java.nio.Buffer return " +
"value for function \"" + binding + "\";" +
" assuming size of equivalent C return type (sizeof(" + cReturnType.getName() + ")): " + binding);
/**
throw new RuntimeException(
- "WARNING: No capacity specified for java.nio.Buffer return " +
+ "No capacity specified for java.nio.Buffer return " +
"value for function \"" + binding + "\";" +
" C return type is " + cReturnType.getName() + ": " + binding); */
}