[libvirt] logging: Libvirtd could not create its own logfile, when the path /var/log/libvirt is not exist.

Martin Kletzander mkletzan at redhat.com
Thu Jul 28 10:58:11 UTC 2016


On Thu, Jul 28, 2016 at 06:40:33AM +0000, weifuqiang wrote:
>Hi all:
>Libvirtd could not create its own logfile, such as /var/log/libvirt/libvirtd.log, when the path /var/log/libvirt is not exist.
>It may be a problem,I think,so try to make patch when open file failed in virLogAddOutputToFile.
>or any better idea?
>
>
>------------
>Libvirtd just creates its logfile, such as /var/log/libvirt/libvirtd.log, DURING INSTALLATION. If the logfile(we mean its path here,that's /var/log/libvirt/) is deleted during its runtime, even if we restart libvirtd, such file would not be generated automatically, thus, the logs are all missing after then, it becomes impossible to debug    problems after then as well. So, we try to mkdir the deleted path after restarting libvirtd.
>
>Or, any better idea?
>

Why would you delete the directory?  The file will get created, don't worry.

>
>  Thanks in advance.
>
>
>
>Wei Fuqiang
>

>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160728/c2295e6c/attachment-0001.sig>


More information about the libvir-list mailing list