summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-29 12:12:34 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-29 12:12:34 -0700
commitd1136b98813b94ae343fc0aa29cffc85751618f4 (patch)
tree4696632da14acce6f4e1809c4467021c4c350807 /cloudinit/util.py
parentb11407d2c75353c3b1e121e861e4b85492ef181a (diff)
downloadvyos-cloud-init-d1136b98813b94ae343fc0aa29cffc85751618f4.tar.gz
vyos-cloud-init-d1136b98813b94ae343fc0aa29cffc85751618f4.zip
Reduce the log levels by removing a few statements that happen to often (and aren't very meaningful)
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index def4fefd..40f31570 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -1068,7 +1068,6 @@ def yaml_dumps(obj):
def ensure_dir(path, mode=None):
if not os.path.isdir(path):
# Make the dir and adjust the mode
- LOG.debug("Ensuring directory exists at path %s", path)
with SeLinuxGuard(os.path.dirname(path), recursive=True):
os.makedirs(path)
chmod(path, mode)
@@ -1221,8 +1220,6 @@ def chmod(path, mode):
except (ValueError, TypeError):
pass
if path and real_mode:
- LOG.debug("Adjusting the permissions of %s (perms=%o)",
- path, real_mode)
with SeLinuxGuard(path):
os.chmod(path, real_mode)
@@ -1238,7 +1235,8 @@ def write_file(filename, content, mode=0644, omode="wb"):
@param omode: The open mode used when opening the file (r, rb, a, etc.)
"""
ensure_dir(os.path.dirname(filename))
- LOG.debug("Writing to %s - %s, %s bytes", filename, omode, len(content))
+ LOG.debug("Writing to %s - %s: [%s] %s bytes",
+ filename, omode, mode, len(content))
with SeLinuxGuard(path=filename):
with open(filename, omode) as fh:
fh.write(content)