[PATCH 37/38] admin: Export logging level constants via libvirt-admin.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]