summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Ray <aray@google.com>2014-03-07 12:18:22 -0800
committerAlex Ray <aray@google.com>2014-03-07 13:58:02 -0800
commit157e1b645ab278d5aaaa09939088b8f8e9d00085 (patch)
tree8e928631e315a698a394ca0f86289d1d54d752eb
parent1367854a891090d1be1edfb12515691b20b350cf (diff)
downloadcore-157e1b645ab278d5aaaa09939088b8f8e9d00085.tar.gz
core-157e1b645ab278d5aaaa09939088b8f8e9d00085.tar.bz2
core-157e1b645ab278d5aaaa09939088b8f8e9d00085.zip
libcutils: add method to get klog level
Change-Id: I55e8311bae97703be26e57b415a8ab0a6d9b4361
-rw-r--r--include/cutils/klog.h1
-rw-r--r--libcutils/klog.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/cutils/klog.h b/include/cutils/klog.h
index 4bcdd0976..3635e8957 100644
--- a/include/cutils/klog.h
+++ b/include/cutils/klog.h
@@ -23,6 +23,7 @@
__BEGIN_DECLS
void klog_init(void);
+int klog_get_level(void);
void klog_set_level(int level);
void klog_close(void);
void klog_write(int level, const char *fmt, ...)
diff --git a/libcutils/klog.c b/libcutils/klog.c
index d3c40dfcf..fbb7b724a 100644
--- a/libcutils/klog.c
+++ b/libcutils/klog.c
@@ -28,6 +28,10 @@
static int klog_fd = -1;
static int klog_level = KLOG_DEFAULT_LEVEL;
+int klog_get_level(void) {
+ return klog_level;
+}
+
void klog_set_level(int level) {
klog_level = level;
}