This function calls virLogVMessage. Move it below the definition
of virLogVMessage so it can call it even without a prototype.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/util/virlog.c | 63 ++++++++++++++++++++++++-----------------------
1 file changed, 32 insertions(+), 31 deletions(-)
diff --git a/src/util/virlog.c b/src/util/virlog.c
index dabfe7e501..983c2565ad 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -478,37 +478,6 @@ virLogSourceUpdate(virLogSourcePtr source)
virLogUnlock();
}
-/**
- * virLogMessage:
- * @source: where is that message coming from
- * @priority: the priority level
- * @filename: file where the message was emitted
- * @linenr: line where the message was emitted
- * @funcname: the function emitting the (debug) message
- * @metadata: NULL or metadata array, terminated by an item with NULL key
- * @fmt: the string format
- * @...: the arguments
- *
- * Call the libvirt logger with some information. Based on the configuration
- * the message may be stored, sent to output or just discarded
- */
-void
-virLogMessage(virLogSourcePtr source,
- virLogPriority priority,
- const char *filename,
- int linenr,
- const char *funcname,
- virLogMetadataPtr metadata,
- const char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- virLogVMessage(source, priority,
- filename, linenr, funcname,
- metadata, fmt, ap);
- va_end(ap);
-}
-
/**
* virLogVMessage:
@@ -639,6 +608,38 @@ virLogVMessage(virLogSourcePtr source,
}
+/**
+ * virLogMessage:
+ * @source: where is that message coming from
+ * @priority: the priority level
+ * @filename: file where the message was emitted
+ * @linenr: line where the message was emitted
+ * @funcname: the function emitting the (debug) message
+ * @metadata: NULL or metadata array, terminated by an item with NULL key
+ * @fmt: the string format
+ * @...: the arguments
+ *
+ * Call the libvirt logger with some information. Based on the configuration
+ * the message may be stored, sent to output or just discarded
+ */
+void
+virLogMessage(virLogSourcePtr source,
+ virLogPriority priority,
+ const char *filename,
+ int linenr,
+ const char *funcname,
+ virLogMetadataPtr metadata,
+ const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ virLogVMessage(source, priority,
+ filename, linenr, funcname,
+ metadata, fmt, ap);
+ va_end(ap);
+}
+
+
static void
virLogOutputToFd(virLogSourcePtr source G_GNUC_UNUSED,
virLogPriority priority G_GNUC_UNUSED,
--
2.26.2