diff options
author | Martin Nagy <mnagy@redhat.com> | 2009-11-23 09:18:25 +0100 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-01-21 17:37:21 -0500 |
commit | 5f5eb2fe13f792faff98452879fa43777690b114 (patch) | |
tree | b96ba6b3a7d8464649113da6fec7280adf256431 /ipaserver/install | |
parent | 7aa78ee06018286efd3f6517a12249e2267536eb (diff) | |
download | freeipa-5f5eb2fe13f792faff98452879fa43777690b114.tar.gz freeipa-5f5eb2fe13f792faff98452879fa43777690b114.tar.xz freeipa-5f5eb2fe13f792faff98452879fa43777690b114.zip |
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.
Diffstat (limited to 'ipaserver/install')
-rw-r--r-- | ipaserver/install/installutils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py index a41176cc7..501d0e80c 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() |