[lxc-devel] [lxc/lxc] 6edbfc: logging: Add lxc_log_options_no_override function

GitHub noreply at github.com
Tue Feb 4 23:02:20 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 6edbfc86508fb07d2b8377dce40f36f3032c32a5
      https://github.com/lxc/lxc/commit/6edbfc86508fb07d2b8377dce40f36f3032c32a5
  Author: Stéphane Graber <stgraber at ubuntu.com>
  Date:   2014-02-04 (Tue, 04 Feb 2014)

  Changed paths:
    M src/lxc/confile.c
    M src/lxc/log.c
    M src/lxc/log.h
    M src/lxc/lxc_attach.c
    M src/lxc/lxc_cgroup.c
    M src/lxc/lxc_console.c
    M src/lxc/lxc_create.c
    M src/lxc/lxc_destroy.c
    M src/lxc/lxc_execute.c
    M src/lxc/lxc_freeze.c
    M src/lxc/lxc_info.c
    M src/lxc/lxc_init.c
    M src/lxc/lxc_monitor.c
    M src/lxc/lxc_monitord.c
    M src/lxc/lxc_snapshot.c
    M src/lxc/lxc_start.c
    M src/lxc/lxc_stop.c
    M src/lxc/lxc_unfreeze.c
    M src/lxc/lxc_wait.c
    M src/python-lxc/lxc/__init__.py

  Log Message:
  -----------
  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 at ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>




More information about the lxc-devel mailing list