[6/8] compel: Move log-related stuff into include/uapi/log.h

Submitted by Pavel Emelianov on Nov. 14, 2016, 1:06 p.m.

Details

Message ID 5829B6BA.8020406@virtuozzo.com
State Accepted
Series "compel: Sanitize API after split, wave 1"
Commit 657836bf7cfdaa70828b19d7beabe27ad486381d
Headers show

Commit Message

Pavel Emelianov Nov. 14, 2016, 1:06 p.m.
This cleans up the main-entry header compel.h

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
---
 compel/include/uapi/compel.h | 8 +-------
 compel/include/uapi/log.h    | 7 +++++++
 2 files changed, 8 insertions(+), 7 deletions(-)
 create mode 100644 compel/include/uapi/log.h

Patch hide | download patch | download mbox

diff --git a/compel/include/uapi/compel.h b/compel/include/uapi/compel.h
index 3554c15..a3faa18 100644
--- a/compel/include/uapi/compel.h
+++ b/compel/include/uapi/compel.h
@@ -17,13 +17,7 @@  typedef struct {
 	long		value;
 } compel_reloc_t;
 
-/*
- * Logging
- */
-typedef void (*compel_log_fn)(unsigned int lvl, const char *fmt, va_list parms);
-extern void compel_log_init(compel_log_fn log_fn, unsigned int level);
-extern unsigned int compel_log_get_loglevel(void);
-
+#include <compel/log.h>
 #include <compel/infect-util.h>
 #include <compel/infect-rpc.h>
 #include <compel/infect.h>
diff --git a/compel/include/uapi/log.h b/compel/include/uapi/log.h
new file mode 100644
index 0000000..cd3bf2a
--- /dev/null
+++ b/compel/include/uapi/log.h
@@ -0,0 +1,7 @@ 
+#ifndef __COMPEL_UAPI_LOG_H__
+#define __COMPEL_UAPI_LOG_H__
+#include <compel/loglevels.h>
+typedef void (*compel_log_fn)(unsigned int lvl, const char *fmt, va_list parms);
+extern void compel_log_init(compel_log_fn log_fn, unsigned int level);
+extern unsigned int compel_log_get_loglevel(void);
+#endif