From 5f5eb2fe13f792faff98452879fa43777690b114 Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Mon, 23 Nov 2009 09:18:25 +0100 Subject: Allow a custom file mode when setting up debugging This will be handy in the future if we will want to install or uninstall only single IPA components and want to append to the installation logs. This will be used by the upcoming ipa-dns-install script. --- ipaserver/install/installutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py index a41176cc..501d0e80 100644 --- a/ipaserver/install/installutils.py +++ b/ipaserver/install/installutils.py @@ -145,14 +145,14 @@ def port_available(port): return rv -def standard_logging_setup(log_filename, debug=False): +def standard_logging_setup(log_filename, debug=False, filemode='w'): old_umask = os.umask(077) # Always log everything (i.e., DEBUG) to the log # file. logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s', filename=log_filename, - filemode='w') + filemode=filemode) os.umask(old_umask) console = logging.StreamHandler() -- cgit