~ajkavanagh/charm-helpers/clean-up-render

« back to all changes in this revision

Viewing changes to charmhelpers/core/host.py

  • Committer: Alex Kavanagh
  • Date: 2017-08-10 15:05:48 UTC
  • Revision ID: alex.kavanagh@canonical.com-20170810150548-4btgunmfz72fjfbj
Change the debug logs in write_file() back to DEBUG from TRACE

They are actually quite useful as DEBUG messages when the files do
actually change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
502
502
        pass
503
503
    if content != existing_content:
504
504
        log("Writing file {} {}:{} {:o}".format(path, owner, group, perms),
505
 
            level=TRACE)
 
505
            level=DEBUG)
506
506
        with open(path, 'wb') as target:
507
507
            os.fchown(target.fileno(), uid, gid)
508
508
            os.fchmod(target.fileno(), perms)
512
512
    # ownership.
513
513
    if existing_uid != uid:
514
514
        log("Changing uid on already existing content: {} -> {}"
515
 
            .format(existing_uid, uid), level=TRACE)
 
515
            .format(existing_uid, uid), level=DEBUG)
516
516
        os.chown(path, uid, -1)
517
517
    if existing_gid != gid:
518
518
        log("Changing gid on already existing content: {} -> {}"
519
 
            .format(existing_gid, gid), level=TRACE)
 
519
            .format(existing_gid, gid), level=DEBUG)
520
520
        os.chown(path, -1, gid)
521
521
 
522
522