[lxc-devel] [PATCH] Move lxc-monitord.log out of /var/lib/lxc/

Robert Vogelgesang vogel at users.sourceforge.net
Fri Apr 4 17:45:08 UTC 2014


Hi Stéphane,

On Fri, Apr 04, 2014 at 01:30:35PM -0400, Stéphane Graber wrote:
> On Fri, Apr 04, 2014 at 07:04:03PM +0200, Robert Vogelgesang wrote:
> > Place log file into LOGPATH instead of LXCPATH (but still use the
> > given lxcpath if the latter differs from LXCPATH).
> 
> Hmm, isn't logpath the per-container logfile storage?

please note: LOGPATH, not logpath.

LOGPATH is defined via the configure script and has a default of
"/var/log/lxc", at least when compiled under RHEL-6 / CentOS-6.

	Robert

> If so, this seems wrong as lxc-monitord itself is a per-system thing not
> per-container.
> 
> > 
> > Signed-off-by: Robert Vogelgesang <vogel at users.sourceforge.net>
> > 
> > diff -up lxc-1.0.2/src/lxc/lxc_monitord.c.monitordlogpath lxc-1.0.2/src/lxc/lxc_monitord.c
> > --- lxc-1.0.2/src/lxc/lxc_monitord.c.monitordlogpath	2014-03-27 20:10:33.000000000 +0100
> > +++ lxc-1.0.2/src/lxc/lxc_monitord.c	2014-04-03 18:28:49.509852307 +0200
> > @@ -348,7 +348,7 @@ int main(int argc, char *argv[])
> >  	}
> >  
> >  	ret = snprintf(logpath, sizeof(logpath), "%s/lxc-monitord.log",
> > -		       lxcpath);
> > +		       (strcmp(LXCPATH, lxcpath) ? lxcpath : LOGPATH ) );
> >  	if (ret < 0 || ret >= sizeof(logpath))
> >  		return EXIT_FAILURE;
> >  
> > _______________________________________________
> > lxc-devel mailing list
> > lxc-devel at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-devel
> 
> -- 
> Stéphane Graber
> Ubuntu developer
> http://www.ubuntu.com



> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list