summaryrefslogtreecommitdiffstats
path: root/include/cutils
diff options
context:
space:
mode:
authorKen Sumrall <ksumrall@android.com>2013-04-15 17:33:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-04-15 17:33:27 +0000
commit774814d1940a87175fc7dc692fef5c626d893968 (patch)
treedd3629bc459c9485b1c27a4272cfda7853cfed76 /include/cutils
parent24bc41b78ca004ac7a6873054ff919da1ba9a6f8 (diff)
parent7425fd1b231fcdb3c260877a13f794a0c7361e80 (diff)
downloadsystem_core-774814d1940a87175fc7dc692fef5c626d893968.zip
system_core-774814d1940a87175fc7dc692fef5c626d893968.tar.gz
system_core-774814d1940a87175fc7dc692fef5c626d893968.tar.bz2
Merge "klog: Have klog_write() call klog_init() if needed" into jb-mr2-dev
Diffstat (limited to 'include/cutils')
-rw-r--r--include/cutils/klog.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/cutils/klog.h b/include/cutils/klog.h
index 1335543..ba728ac 100644
--- a/include/cutils/klog.h
+++ b/include/cutils/klog.h
@@ -17,12 +17,18 @@
#ifndef _CUTILS_KLOG_H_
#define _CUTILS_KLOG_H_
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
void klog_init(void);
void klog_set_level(int level);
void klog_close(void);
void klog_write(int level, const char *fmt, ...)
__attribute__ ((format(printf, 2, 3)));
+__END_DECLS
+
#define KLOG_ERROR(tag,x...) klog_write(3, "<3>" tag ": " x)
#define KLOG_WARNING(tag,x...) klog_write(4, "<4>" tag ": " x)
#define KLOG_NOTICE(tag,x...) klog_write(5, "<5>" tag ": " x)