Turn virLogSource into a struct instead of an enum

As part of the goal to get away from doing string matching on
filenames when deciding whether to emit a log message, turn
the virLogSource enum into a struct which contains a log
"name". There will eventually be one virLogSource instance
statically declared per source file. To minimise churn in this
commit though, a single global instance is used.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2014-02-27 17:44:53 +00:00
parent b29275d928
commit 098dd79ee2
10 changed files with 45 additions and 48 deletions

View File

@@ -584,7 +584,7 @@ struct virtTestLogData {
static struct virtTestLogData testLog = { VIR_BUFFER_INITIALIZER };
static void
virtTestLogOutput(virLogSource source ATTRIBUTE_UNUSED,
virtTestLogOutput(virLogSourcePtr source ATTRIBUTE_UNUSED,
virLogPriority priority ATTRIBUTE_UNUSED,
const char *filename ATTRIBUTE_UNUSED,
int lineno ATTRIBUTE_UNUSED,