Skip to content

Commit 35eca23

Browse files
committed
util: log: move virLogMessage
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 <[email protected]> Reviewed-by: Martin Kletzander <[email protected]>
1 parent 9a7953b commit 35eca23

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed

src/util/virlog.c

+32-31
Original file line numberDiff line numberDiff line change
@@ -478,37 +478,6 @@ virLogSourceUpdate(virLogSourcePtr source)
478478
virLogUnlock();
479479
}
480480

481-
/**
482-
* virLogMessage:
483-
* @source: where is that message coming from
484-
* @priority: the priority level
485-
* @filename: file where the message was emitted
486-
* @linenr: line where the message was emitted
487-
* @funcname: the function emitting the (debug) message
488-
* @metadata: NULL or metadata array, terminated by an item with NULL key
489-
* @fmt: the string format
490-
* @...: the arguments
491-
*
492-
* Call the libvirt logger with some information. Based on the configuration
493-
* the message may be stored, sent to output or just discarded
494-
*/
495-
void
496-
virLogMessage(virLogSourcePtr source,
497-
virLogPriority priority,
498-
const char *filename,
499-
int linenr,
500-
const char *funcname,
501-
virLogMetadataPtr metadata,
502-
const char *fmt, ...)
503-
{
504-
va_list ap;
505-
va_start(ap, fmt);
506-
virLogVMessage(source, priority,
507-
filename, linenr, funcname,
508-
metadata, fmt, ap);
509-
va_end(ap);
510-
}
511-
512481

513482
/**
514483
* virLogVMessage:
@@ -639,6 +608,38 @@ virLogVMessage(virLogSourcePtr source,
639608
}
640609

641610

611+
/**
612+
* virLogMessage:
613+
* @source: where is that message coming from
614+
* @priority: the priority level
615+
* @filename: file where the message was emitted
616+
* @linenr: line where the message was emitted
617+
* @funcname: the function emitting the (debug) message
618+
* @metadata: NULL or metadata array, terminated by an item with NULL key
619+
* @fmt: the string format
620+
* @...: the arguments
621+
*
622+
* Call the libvirt logger with some information. Based on the configuration
623+
* the message may be stored, sent to output or just discarded
624+
*/
625+
void
626+
virLogMessage(virLogSourcePtr source,
627+
virLogPriority priority,
628+
const char *filename,
629+
int linenr,
630+
const char *funcname,
631+
virLogMetadataPtr metadata,
632+
const char *fmt, ...)
633+
{
634+
va_list ap;
635+
va_start(ap, fmt);
636+
virLogVMessage(source, priority,
637+
filename, linenr, funcname,
638+
metadata, fmt, ap);
639+
va_end(ap);
640+
}
641+
642+
642643
static void
643644
virLogOutputToFd(virLogSourcePtr source G_GNUC_UNUSED,
644645
virLogPriority priority G_GNUC_UNUSED,

0 commit comments

Comments
 (0)