[node-patches] Change in ovirt-node[master]: cim_model.py: Miss titles for class "ConfigureCIM" and "SetC...

hadong0720 at gmail.com hadong0720 at gmail.com
Fri Jun 7 08:52:05 UTC 2013


hadong has uploaded a new change for review.

Change subject: cim_model.py: Miss titles for class "ConfigureCIM" and "SetCIMPassword"
......................................................................

cim_model.py: Miss titles for class "ConfigureCIM"
and "SetCIMPassword"

Previously these classes "ConfigureCIM" and "SetCIMPassword"
were missed titles
Now fixed them.

Change-Id: I76804e37737910c64519efaca7503b79ee32c44e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=971709
Signed-off-by: hadong <hadong0720 at gmail.com>
---
M src/ovirt/node/app.py
1 file changed, 29 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/35/15435/1

diff --git a/src/ovirt/node/app.py b/src/ovirt/node/app.py
index 557fd45..482565e 100644
--- a/src/ovirt/node/app.py
+++ b/src/ovirt/node/app.py
@@ -18,13 +18,15 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.  A copy of the GNU General Public License is
 # also available at http://www.gnu.org/copyleft/gpl.html.
+from StringIO import StringIO
+from optparse import OptionParser
 from ovirt.node import base, utils, plugins, ui
 from ovirt.node.config import defaults
 from ovirt.node.ui import urwid_builder
 from ovirt.node.utils import system, Timer, console
 import logging
 import logging.config
-from optparse import OptionParser
+import os.path
 
 """
 Representing the whole application (not just the TUI).
@@ -32,13 +34,35 @@
 which communicate with each other.
 """
 
-LOG_CONF = "/etc/ovirt-node/logging.conf"
-
-logging.config.fileConfig(LOG_CONF)
+RUNTIME_LOG_CONF_FILENAME = "/etc/ovirt-node/logging.conf"
 
 
 def configure_logging():
-    logging.config.fileConfig(LOG_CONF)
+    mixedfile = RUNTIME_LOG_CONF_FILENAME
+    if not os.path.exists(mixedfile):
+        mixedfile = StringIO("""
+[loggers]
+keys=root
+[handlers]
+keys=debug
+[formatters]
+keys=verbose
+[logger_root]
+level=DEBUG
+handlers=debug
+[handler_debug]
+class=FileHandler
+level=DEBUG
+formatter=verbose
+args=('/tmp/ovirt-node.debug.log', 'w')
+[formatter_verbose]
+format=%(levelname)10s %(asctime)s %(pathname)s:%(funcName)s:%(lineno)s \
+%(message)s
+        """)
+    logging.config.fileConfig(mixedfile)
+
+
+configure_logging()
 
 
 class Application(base.Base):


--
To view, visit http://gerrit.ovirt.org/15435
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I76804e37737910c64519efaca7503b79ee32c44e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>



More information about the node-patches mailing list