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

Re: [libvirt] [PATCH] cleanup of loging definitions



On Thu, Nov 06, 2008 at 02:17:49PM +0000, Daniel P. Berrange wrote:
> On Thu, Nov 06, 2008 at 02:16:52PM +0100, Daniel Veillard wrote:
> >   Currently the debugFlag switch, the VIR_DEBUG, DEBUG and DEBUG0
> > macros were scattered in various places, duplicated once (or twice)
> > per generated binaries. This patch moves everything in one virtlog.h
> > header, one virtlog.c file and set up the makefiles so that the
> > various binaries refers to the same bits.
> >   That's a cleanup with no functional change to prepare the real
> > loging APIs, patch and the 2 new files attached,
> 
> ACK, this seems like a good idea considering we'll have more logging
> stuff in the future. I'd prefer to drop the 'virt' prefix though and
> just call it 'logging.c' or 'log.c'

Okay, I don't really care for the name, except I was wondering about log.h
and since we prefer to align .c and .h names ...

wei:~/libvirt/src -> locate /log.h | wc -l
14

 okay most of them come from kernel source headers, but things like
  /usr/include/avahi-core/log.h
make me feel that a virt prefix is safer ...

> Perhaps we should have a virLogInitialize() method todo the stuff
> like getenv("LIBVIRT_DEBUG") that's currently in virInitialize().
> eg, just make virInitialize() call virLogInitialize() for setup

  Yup, that's one of the things to do, it's just an initial refactoring
to ease doing the cleanup and extensions.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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