mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
logging: move virLogHandler to header
Signed-off-by: Oleg Vasilev <oleg.vasilev@virtuozzo.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
00e682741c
commit
673f22159d
@ -22,11 +22,9 @@
|
||||
|
||||
#include "log_handler.h"
|
||||
#include "virerror.h"
|
||||
#include "virobject.h"
|
||||
#include "virfile.h"
|
||||
#include "viralloc.h"
|
||||
#include "virlog.h"
|
||||
#include "virrotatingfile.h"
|
||||
#include "viruuid.h"
|
||||
#include "virutil.h"
|
||||
|
||||
@ -42,30 +40,6 @@ VIR_LOG_INIT("logging.log_handler");
|
||||
|
||||
#define DEFAULT_MODE 0600
|
||||
|
||||
typedef struct _virLogHandlerLogFile virLogHandlerLogFile;
|
||||
struct _virLogHandlerLogFile {
|
||||
virRotatingFileWriter *file;
|
||||
int watch;
|
||||
int pipefd; /* Read from QEMU via this */
|
||||
bool drained;
|
||||
|
||||
char *driver;
|
||||
unsigned char domuuid[VIR_UUID_BUFLEN];
|
||||
char *domname;
|
||||
};
|
||||
|
||||
struct _virLogHandler {
|
||||
virObjectLockable parent;
|
||||
|
||||
bool privileged;
|
||||
virLogDaemonConfig *config;
|
||||
|
||||
virLogHandlerLogFile **files;
|
||||
size_t nfiles;
|
||||
|
||||
virLogHandlerShutdownInhibitor inhibitor;
|
||||
void *opaque;
|
||||
};
|
||||
|
||||
static virClass *virLogHandlerClass;
|
||||
static void virLogHandlerDispose(void *obj);
|
||||
|
@ -23,13 +23,38 @@
|
||||
#include "internal.h"
|
||||
#include "virjson.h"
|
||||
#include "log_daemon_config.h"
|
||||
|
||||
typedef struct _virLogHandler virLogHandler;
|
||||
|
||||
#include "virobject.h"
|
||||
#include "virrotatingfile.h"
|
||||
|
||||
typedef void (*virLogHandlerShutdownInhibitor)(bool inhibit,
|
||||
void *opaque);
|
||||
|
||||
typedef struct _virLogHandlerLogFile virLogHandlerLogFile;
|
||||
struct _virLogHandlerLogFile {
|
||||
virRotatingFileWriter *file;
|
||||
int watch;
|
||||
int pipefd; /* Read from QEMU via this */
|
||||
bool drained;
|
||||
|
||||
char *driver;
|
||||
unsigned char domuuid[VIR_UUID_BUFLEN];
|
||||
char *domname;
|
||||
};
|
||||
|
||||
typedef struct _virLogHandler virLogHandler;
|
||||
struct _virLogHandler {
|
||||
virObjectLockable parent;
|
||||
|
||||
bool privileged;
|
||||
virLogDaemonConfig *config;
|
||||
|
||||
virLogHandlerLogFile **files;
|
||||
size_t nfiles;
|
||||
|
||||
virLogHandlerShutdownInhibitor inhibitor;
|
||||
void *opaque;
|
||||
};
|
||||
|
||||
virLogHandler *virLogHandlerNew(bool privileged,
|
||||
virLogDaemonConfig *config,
|
||||
virLogHandlerShutdownInhibitor inhibitor,
|
||||
|
Loading…
x
Reference in New Issue
Block a user