WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xend: open qemu-dm log files in append mode

Ian Jackson wrote:
It would be good if the maximum logfiles to keep would be
configurable; making it part of the ordinary xend configuration would
do.

Also, one minor stylistic point.  This idiom
    if os.path.exists(self.logfile + ".%d" % nr_max_log_rotation):
is rather unusual, although not actually wrong.  It combines string
concatenation and %-formatting.  Surely one of
    "%s.%d" % (self.logfile, nr_max_log_rotation)
    self.logfile + '.' + `nr_max_log_rotation`
would be better ?  (I would have used the former.)

Done in qemu-log-rotate-config.patch.
I've set the logrotate count default to 10. It is small enough not to
annoy users by filling xen log directory with many files, I think.

I also created a patch (qemu-log-append-config.patch) which opens
qemu-dm logfiles in append mode if the logrotate count is 0. If this
makes sense, please apply it after qemu-log-rotate-config.patch.

Thanks,
--Yosuke

Attachment: qemu-log-append-config.patch
Description: all/allfiles

Attachment: qemu-log-rotate-config.patch
Description: all/allfiles

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel