]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/tools/lxc_start.c
logging: Add lxc_log_options_no_override function
authorStéphane Graber <stgraber@ubuntu.com>
Tue, 4 Feb 2014 18:03:05 +0000 (13:03 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 4 Feb 2014 23:01:59 +0000 (18:01 -0500)
commit6edbfc86508fb07d2b8377dce40f36f3032c32a5
tree44111132c409c85e9979dc26c69a10b93d18f5d7
parent2133f58c66ab7627a4159fafbb75106c556b014d
logging: Add lxc_log_options_no_override function

In current LXC, loglevel and logfile are write-once functions.
That behaviour was appropriate when those two were first introduced
(pre-API) but with current API, one would expect to be able to
set_config_item those multiple times.

So instead, introduce lxc_log_options_no_override which when called
turns those two config keys read-only and have all existing binaries
which use log_init call that function once they're done setting the
value requested by the user.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
20 files changed:
src/lxc/confile.c
src/lxc/log.c
src/lxc/log.h
src/lxc/lxc_attach.c
src/lxc/lxc_cgroup.c
src/lxc/lxc_console.c
src/lxc/lxc_create.c
src/lxc/lxc_destroy.c
src/lxc/lxc_execute.c
src/lxc/lxc_freeze.c
src/lxc/lxc_info.c
src/lxc/lxc_init.c
src/lxc/lxc_monitor.c
src/lxc/lxc_monitord.c
src/lxc/lxc_snapshot.c
src/lxc/lxc_start.c
src/lxc/lxc_stop.c
src/lxc/lxc_unfreeze.c
src/lxc/lxc_wait.c
src/python-lxc/lxc/__init__.py