|
|
9991ea |
From 09a2ae5368abce22e397fef29d3acf3c16b8b96c Mon Sep 17 00:00:00 2001
|
|
|
9991ea |
From: Petr Viktorin <pviktori@redhat.com>
|
|
|
9991ea |
Date: Wed, 5 Feb 2014 09:24:22 +0100
|
|
|
9991ea |
Subject: [PATCH 43/46] ipa tool: Print the name of the server we are
|
|
|
9991ea |
connecting to with -v
|
|
|
9991ea |
MIME-Version: 1.0
|
|
|
9991ea |
Content-Type: text/plain; charset=UTF-8
|
|
|
9991ea |
Content-Transfer-Encoding: 8bit
|
|
|
9991ea |
|
|
|
9991ea |
The logging level for these messages was decreaed so that they
|
|
|
9991ea |
do not show up in ipa-advise output.
|
|
|
9991ea |
Reset the log level to INFO and configure ipa-advise to not display
|
|
|
9991ea |
INFO messages from xmlclient by default.
|
|
|
9991ea |
|
|
|
9991ea |
Partially reverts commit efe5a96725d3ddcd05b03a1ca9df5597eee693be
|
|
|
9991ea |
|
|
|
9991ea |
https://fedorahosted.org/freeipa/ticket/4135
|
|
|
9991ea |
|
|
|
9991ea |
Reviewed-By: Tomáš Babej <tbabej@redhat.com>
|
|
|
9991ea |
---
|
|
|
9991ea |
ipalib/rpc.py | 4 ++--
|
|
|
9991ea |
ipaserver/advise/base.py | 5 +++++
|
|
|
9991ea |
2 files changed, 7 insertions(+), 2 deletions(-)
|
|
|
9991ea |
|
|
|
9991ea |
diff --git a/ipalib/rpc.py b/ipalib/rpc.py
|
|
|
9991ea |
index 81e7aa35fdf780b3dcd850cfcc3ba5285d71e461..1eec1134617dd49395c2b36f11f304c473067a5d 100644
|
|
|
9991ea |
--- a/ipalib/rpc.py
|
|
|
9991ea |
+++ b/ipalib/rpc.py
|
|
|
9991ea |
@@ -621,7 +621,7 @@ def create_connection(self, ccache=None, verbose=False, fallback=True,
|
|
|
9991ea |
kw['transport'] = KerbTransport()
|
|
|
9991ea |
else:
|
|
|
9991ea |
kw['transport'] = LanguageAwareTransport()
|
|
|
9991ea |
- self.log.debug('trying %s' % url)
|
|
|
9991ea |
+ self.log.info('trying %s' % url)
|
|
|
9991ea |
setattr(context, 'request_url', url)
|
|
|
9991ea |
serverproxy = ServerProxy(url, **kw)
|
|
|
9991ea |
if len(urls) == 1:
|
|
|
9991ea |
@@ -697,7 +697,7 @@ def forward(self, name, *args, **kw):
|
|
|
9991ea |
'%s.forward(): %r not in api.Command' % (self.name, name)
|
|
|
9991ea |
)
|
|
|
9991ea |
server = getattr(context, 'request_url', None)
|
|
|
9991ea |
- self.debug("Forwarding '%s' to server '%s'", name, server)
|
|
|
9991ea |
+ self.log.info("Forwarding '%s' to server '%s'", name, server)
|
|
|
9991ea |
command = getattr(self.conn, name)
|
|
|
9991ea |
params = [args, kw]
|
|
|
9991ea |
try:
|
|
|
9991ea |
diff --git a/ipaserver/advise/base.py b/ipaserver/advise/base.py
|
|
|
9991ea |
index 92dbb4e9e30c6d624eca95609568ae62bd9ea7fe..056cb808d24805202f16b4afd60356163ca9006a 100644
|
|
|
9991ea |
--- a/ipaserver/advise/base.py
|
|
|
9991ea |
+++ b/ipaserver/advise/base.py
|
|
|
9991ea |
@@ -22,6 +22,7 @@
|
|
|
9991ea |
from ipalib.errors import ValidationError
|
|
|
9991ea |
from ipapython import admintool
|
|
|
9991ea |
from textwrap import wrap
|
|
|
9991ea |
+from ipapython.ipa_log_manager import log_mgr
|
|
|
9991ea |
|
|
|
9991ea |
|
|
|
9991ea |
"""
|
|
|
9991ea |
@@ -173,6 +174,10 @@ def run(self):
|
|
|
9991ea |
|
|
|
9991ea |
api.bootstrap(in_server=False, context='advise')
|
|
|
9991ea |
api.finalize()
|
|
|
9991ea |
+ if not self.options.verbose:
|
|
|
9991ea |
+ # Do not print connection information by default
|
|
|
9991ea |
+ logger_name = r'ipa\.ipalib\.rpc\.xmlclient'
|
|
|
9991ea |
+ log_mgr.configure(dict(logger_regexps=[(logger_name, 'warning')]))
|
|
|
9991ea |
|
|
|
9991ea |
# With no argument, print the list out and exit
|
|
|
9991ea |
if not self.args:
|
|
|
9991ea |
--
|
|
|
9991ea |
1.8.5.3
|
|
|
9991ea |
|