mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
admin tools: Log IPA version
Add the IPA version, and vendor version if applicable, to the beginning of admintool logs -- both framework and indivitual tools that don't yet use the framework. This will make debugging easier. https://fedorahosted.org/freeipa/ticket/4219 Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
7f465e693c
commit
d6a4da30de
@ -217,6 +217,7 @@ def main():
|
||||
|
||||
root_logger.debug('%s was invoked with options: %s' % (sys.argv[0], safe_options))
|
||||
root_logger.debug("missing options might be asked for interactively later\n")
|
||||
root_logger.debug('IPA version %s' % version.VENDOR_VERSION)
|
||||
|
||||
check_server_configuration()
|
||||
|
||||
|
@ -99,6 +99,7 @@ def main():
|
||||
standard_logging_setup(log_file_name, debug=options.debug)
|
||||
|
||||
root_logger.debug('%s was invoked with argument "%s" and options: %s' % (sys.argv[0], filename, safe_options))
|
||||
root_logger.debug('IPA version %s' % version.VENDOR_VERSION)
|
||||
|
||||
if not ipautil.file_exists(filename):
|
||||
sys.exit("Replica file %s does not exist" % filename)
|
||||
|
@ -80,6 +80,7 @@ def main():
|
||||
|
||||
root_logger.debug('%s was invoked with options: %s' % (sys.argv[0], safe_options))
|
||||
root_logger.debug("missing options might be asked for interactively later\n")
|
||||
root_logger.debug('IPA version %s' % version.VENDOR_VERSION)
|
||||
|
||||
installutils.check_server_configuration()
|
||||
|
||||
|
@ -302,6 +302,7 @@ def main():
|
||||
logging_setup(options)
|
||||
root_logger.debug('%s was invoked with options: %s' % (sys.argv[0], safe_options))
|
||||
root_logger.debug("missing options might be asked for interactively later\n")
|
||||
root_logger.debug('IPA version %s' % version.VENDOR_VERSION)
|
||||
|
||||
signal.signal(signal.SIGTERM, sigterm_handler)
|
||||
|
||||
|
@ -455,6 +455,7 @@ def main():
|
||||
|
||||
standard_logging_setup(log_file_name, debug=options.debug)
|
||||
root_logger.debug('%s was invoked with argument "%s" and options: %s' % (sys.argv[0], filename, safe_options))
|
||||
root_logger.debug('IPA version %s' % version.VENDOR_VERSION)
|
||||
|
||||
if not ipautil.file_exists(filename):
|
||||
sys.exit("Replica file %s does not exist" % filename)
|
||||
|
@ -607,6 +607,7 @@ def main():
|
||||
|
||||
root_logger.debug('%s was invoked with options: %s' % (sys.argv[0], safe_options))
|
||||
root_logger.debug("missing options might be asked for interactively later\n")
|
||||
root_logger.debug('IPA version %s' % version.VENDOR_VERSION)
|
||||
|
||||
global fstore
|
||||
fstore = sysrestore.FileStore(SYSRESTORE_DIR_PATH)
|
||||
|
@ -1014,6 +1014,7 @@ def main():
|
||||
standard_logging_setup('/var/log/ipaupgrade.log', debug=options.debug,
|
||||
verbose=verbose, console_format=console_format, filemode='a')
|
||||
root_logger.debug('%s was invoked with options: %s' % (sys.argv[0], safe_options))
|
||||
root_logger.debug('IPA version %s' % version.VENDOR_VERSION)
|
||||
|
||||
fstore = sysrestore.FileStore('/var/lib/ipa/sysrestore')
|
||||
|
||||
|
@ -2856,6 +2856,7 @@ def main():
|
||||
root_logger.debug(
|
||||
'%s was invoked with options: %s', sys.argv[0], safe_options)
|
||||
root_logger.debug("missing options might be asked for interactively later")
|
||||
root_logger.debug('IPA version %s' % version.VENDOR_VERSION)
|
||||
|
||||
env={"PATH":"/bin:/sbin:/usr/kerberos/bin:/usr/kerberos/sbin:/usr/bin:/usr/sbin"}
|
||||
|
||||
|
@ -283,6 +283,7 @@ class AdminTool(object):
|
||||
"""
|
||||
self.log.debug('%s was invoked with arguments %s and options: %s',
|
||||
self.command_name, self.args, self.safe_options)
|
||||
self.log.debug('IPA version %s' % version.VENDOR_VERSION)
|
||||
|
||||
def log_failure(self, error_message, return_value, exception, backtrace):
|
||||
self.log.debug(''.join(traceback.format_tb(backtrace)))
|
||||
|
Loading…
Reference in New Issue
Block a user