We should encourage libvirt users to use our own constants when modifying
logging level, instead of their own values.
---
include/libvirt/libvirt-admin.h | 15 +++++++++++++++
src/util/virlog.h | 10 ----------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/include/libvirt/libvirt-admin.h b/include/libvirt/libvirt-admin.h
index be3af3a..dc7d252 100644
--- a/include/libvirt/libvirt-admin.h
+++ b/include/libvirt/libvirt-admin.h
@@ -35,6 +35,21 @@ extern "C" {
# undef __VIR_ADMIN_H_INCLUDES__
/**
+ * virLogPriority:
+ *
+ * These levels are recognized by daemon's logger and can be statically
+ * configured in daemon's configuration file (e.g. libvirtd.conf). For runtime
+ * level retrieval and modification use virAdmConnectGetLoggingLevel and
+ * virAdmConnectSetLoggingLevel APIs.
+ */
+typedef enum {
+ VIR_LOG_DEBUG = 1,
+ VIR_LOG_INFO,
+ VIR_LOG_WARN,
+ VIR_LOG_ERROR,
+} virLogPriority;
+
+/**
* virAdmConnect:
*
* a virAdmConnect is a private structure representing a connection to
diff --git a/src/util/virlog.h b/src/util/virlog.h
index f5c0a4f..b631327 100644
--- a/src/util/virlog.h
+++ b/src/util/virlog.h
@@ -38,16 +38,6 @@
"libvirt version: " VERSION
# endif
-/*
- * To be made public
- */
-typedef enum {
- VIR_LOG_DEBUG = 1,
- VIR_LOG_INFO,
- VIR_LOG_WARN,
- VIR_LOG_ERROR,
-} virLogPriority;
-
# define VIR_LOG_DEFAULT VIR_LOG_WARN
typedef enum {
--
2.4.3