• R/O
  • SSH
  • HTTPS

senna-java: Commit


Commit MetaInfo

Revision9 (tree)
Time2008-12-22 15:49:01
Authormir

Log Message

* src/java/senna/SennaLogger.java: add write method
* src/jni/senna_SennaLogger.h: add write method
* src/jni/senna_SennaLogger.c: add write method

Change Summary

Incremental Difference

--- trunk/ChangeLog (revision 8)
+++ trunk/ChangeLog (revision 9)
@@ -1,3 +1,8 @@
1+2008-12-22 Tetsuro IKEDA <ikdttr@gmail.com>
2+ * src/java/senna/SennaLogger.java: add write method
3+ * src/jni/senna_SennaLogger.h: add write method
4+ * src/jni/senna_SennaLogger.c: add write method
5+
16 2008-12-19 Tetsuro IKEDA <ikdttr@gmail.com>
27 * src/jni/Makefile: remove trash
38
--- trunk/src/jni/senna_SennaLogger.c (revision 8)
+++ trunk/src/jni/senna_SennaLogger.c (revision 9)
@@ -98,3 +98,15 @@
9898 log_level = level;
9999 senna_logger.max_level = (sen_log_level) log_level;
100100 }
101+
102+/*
103+ * Class: senna_SennaLogger
104+ * Method: write
105+ * Signature: (ILjava/lang/String;)V
106+ */
107+JNIEXPORT void JNICALL
108+Java_senna_SennaLogger_write(JNIEnv *env, jclass clazz,
109+ jint level, jstring message)
110+{
111+ SEN_LOG(level, message);
112+}
--- trunk/src/jni/senna_SennaLogger.h (revision 8)
+++ trunk/src/jni/senna_SennaLogger.h (revision 9)
@@ -39,6 +39,14 @@
3939 JNIEXPORT void JNICALL Java_senna_SennaLogger_setLevel
4040 (JNIEnv *, jclass, jint);
4141
42+/*
43+ * Class: senna_SennaLogger
44+ * Method: write
45+ * Signature: (ILjava/lang/String;)V
46+ */
47+JNIEXPORT void JNICALL Java_senna_SennaLogger_write
48+ (JNIEnv *, jclass, jint, jstring);
49+
4250 #ifdef __cplusplus
4351 }
4452 #endif
--- trunk/src/java/senna/SennaLogger.java (revision 8)
+++ trunk/src/java/senna/SennaLogger.java (revision 9)
@@ -66,4 +66,13 @@
6666 * @throws SennaException
6767 */
6868 public static native void setLevel(int level) throws SennaException;
69+
70+ /**
71+ * write log with level.
72+ *
73+ * @param level log level
74+ * @param message log message
75+ * @throws SennaException
76+ */
77+ public static native void write(int level, String message) throws SennaException;
6978 }
Show on old repository browser