Hello Nir Soffer, Dima Kuznetsov, Dan Kenigsberg,
I'd like you to do a code review. Please visit
to review the following change.
Change subject: logging: Enable all loggers ......................................................................
logging: Enable all loggers
Unless disable_existsing_loggers is passed as false, logging checks the pre-existing logs and disables any that are not mentioned in the configuration file, this causes various logs to be not visible.
Change-Id: Ia6cbf7d749cfc2d432624213bfe5beb26055e5a8 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1060510 Signed-off-by: Dima Kuznetsov dkuznets@redhat.com Reviewed-on: http://gerrit.ovirt.org/25185 Reviewed-by: Yaniv Bronhaim ybronhei@redhat.com Reviewed-by: Nir Soffer nsoffer@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M lib/vdsm/tool/upgrade.py M vdsm/supervdsmServer M vdsm/ut/ivdsm.py M vdsm/vdsm M vdsm/vdsm-restore-net-config M vdsm_reg/vdsm-reg-setup.in 6 files changed, 8 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/51/25451/1
diff --git a/lib/vdsm/tool/upgrade.py b/lib/vdsm/tool/upgrade.py index f013798..2e19701 100644 --- a/lib/vdsm/tool/upgrade.py +++ b/lib/vdsm/tool/upgrade.py @@ -57,7 +57,8 @@ # This will override VDSM's root logger but will keep the other # loggers intact. During an upgrade we add the update handler # to all loggers. - logging.config.fileConfig(P_VDSM_CONF + 'logger.conf') + logging.config.fileConfig(P_VDSM_CONF + 'logger.conf', + disable_existing_loggers=False) logging.config.fileConfig(P_VDSM_CONF + 'upgrade.logger.conf', disable_existing_loggers=False) chown( diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer index 21351c3..dbf1498 100755 --- a/vdsm/supervdsmServer +++ b/vdsm/supervdsmServer @@ -34,7 +34,7 @@ LOG_CONF_PATH = "/etc/vdsm/svdsm.logger.conf"
try: - logging.config.fileConfig(LOG_CONF_PATH) + logging.config.fileConfig(LOG_CONF_PATH, disable_existing_loggers=False) except: logging.basicConfig(filename='/dev/stdout', filemode='w+', level=logging.DEBUG) diff --git a/vdsm/ut/ivdsm.py b/vdsm/ut/ivdsm.py index 086e90c..a6dcd91 100644 --- a/vdsm/ut/ivdsm.py +++ b/vdsm/ut/ivdsm.py @@ -42,7 +42,7 @@ import clientIF
loggerConfFile = loggerConfigurationPath - lconfig.fileConfig(loggerConfFile) + lconfig.fileConfig(loggerConfFile, disable_existing_loggers=False) log = logging.getLogger('vds')
config.read(configFilePath) diff --git a/vdsm/vdsm b/vdsm/vdsm index d91704a..1f72755 100755 --- a/vdsm/vdsm +++ b/vdsm/vdsm @@ -79,7 +79,7 @@
def run(pidfile=None): - lconfig.fileConfig(loggerConfFile) + lconfig.fileConfig(loggerConfFile, disable_existing_loggers=False) logging.addLevelName(5, 'TRACE') logging.TRACE = 5 # impolite but helpful
diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config index fc2308b..9e90be8 100755 --- a/vdsm/vdsm-restore-net-config +++ b/vdsm/vdsm-restore-net-config @@ -69,7 +69,8 @@
if __name__ == '__main__': try: - logging.config.fileConfig('/etc/vdsm/svdsm.logger.conf') + logging.config.fileConfig('/etc/vdsm/svdsm.logger.conf', + disable_existing_loggers=False) except: logging.basicConfig(filename='/dev/stdout', filemode='w+', level=logging.DEBUG) diff --git a/vdsm_reg/vdsm-reg-setup.in b/vdsm_reg/vdsm-reg-setup.in index 6489d8a..9bc58dd 100644 --- a/vdsm_reg/vdsm-reg-setup.in +++ b/vdsm_reg/vdsm-reg-setup.in @@ -246,7 +246,7 @@ if daemonize: createDaemon.createDaemon() #set up logger - logging.config.fileConfig(loggerConf) + logging.config.fileConfig(loggerConf, disable_existing_loggers=False) log = logging.getLogger('') if daemonize: log = logging.getLogger('vdsRegistrator')
Yaniv Bronhaim has posted comments on this change.
Change subject: logging: Enable all loggers ......................................................................
Patch Set 1: Code-Review+2
Yaniv Bronhaim has posted comments on this change.
Change subject: logging: Enable all loggers ......................................................................
Patch Set 1: Verified+1
Dima Kuznetsov has posted comments on this change.
Change subject: logging: Enable all loggers ......................................................................
Patch Set 1: Code-Review+1
Yaniv Bronhaim has submitted this change and it was merged.
Change subject: logging: Enable all loggers ......................................................................
logging: Enable all loggers
Unless disable_existsing_loggers is passed as false, logging checks the pre-existing logs and disables any that are not mentioned in the configuration file, this causes various logs to be not visible.
Change-Id: Ia6cbf7d749cfc2d432624213bfe5beb26055e5a8 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1060510 Signed-off-by: Dima Kuznetsov dkuznets@redhat.com Reviewed-on: http://gerrit.ovirt.org/25185 Reviewed-by: Yaniv Bronhaim ybronhei@redhat.com Reviewed-by: Nir Soffer nsoffer@redhat.com Reviewed-by: Dan Kenigsberg danken@redhat.com Reviewed-on: http://gerrit.ovirt.org/25451 Tested-by: Yaniv Bronhaim ybronhei@redhat.com --- M lib/vdsm/tool/upgrade.py M vdsm/supervdsmServer M vdsm/ut/ivdsm.py M vdsm/vdsm M vdsm/vdsm-restore-net-config M vdsm_reg/vdsm-reg-setup.in 6 files changed, 8 insertions(+), 6 deletions(-)
Approvals: Yaniv Bronhaim: Verified; Looks good to me, approved Dima Kuznetsov: Looks good to me, but someone else must approve
vdsm-patches@lists.fedorahosted.org