summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2009-11-23 09:18:25 +0100
committerRob Crittenden <rcritten@redhat.com>2010-01-21 17:37:21 -0500
commit5f5eb2fe13f792faff98452879fa43777690b114 (patch)
treeb96ba6b3a7d8464649113da6fec7280adf256431 /ipaserver
parent7aa78ee06018286efd3f6517a12249e2267536eb (diff)
downloadfreeipa-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')
-rw-r--r--ipaserver/install/installutils.py4
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()