[libvirt] [PATCH 5/7] lxc: append container log file
Daniel P. Berrange
berrange at redhat.com
Mon Oct 5 12:52:53 UTC 2009
On Sun, Oct 04, 2009 at 03:29:10PM -0400, Amy Griffis wrote:
> Do we really want to overwrite the container log file every time we
> restart?
> ---
>
> src/lxc/lxc_driver.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
> index c5a49f2..73cfecd 100644
> --- a/src/lxc/lxc_driver.c
> +++ b/src/lxc/lxc_driver.c
> @@ -1037,7 +1037,7 @@ static int lxcVmStart(virConnectPtr conn,
> goto cleanup;
> }
>
> - if ((logfd = open(logfile, O_WRONLY | O_TRUNC | O_CREAT,
> + if ((logfd = open(logfile, O_WRONLY | O_APPEND | O_CREAT,
> S_IRUSR|S_IWUSR)) < 0) {
> virReportSystemError(conn, errno,
> _("failed to open '%s'"),
>
ACK
Truncation can be dealt with my logrotate in a much more flexible manner
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list