From e6068bd62bd5c7a6bbc8d05b2f115ea983cc73d8 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Wed, 9 Jan 2013 18:49:12 -0800 Subject: [PATCH] Log when release file lock We log when waiting for a file lock, when getting one, so lets log when releasing one. Change-Id: I1838c424fda74c04e9c2107db08226670e8372f3 --- openstack/common/lockutils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openstack/common/lockutils.py b/openstack/common/lockutils.py index 40741ca..afd6d00 100644 --- a/openstack/common/lockutils.py +++ b/openstack/common/lockutils.py @@ -220,6 +220,11 @@ def synchronized(name, lock_file_prefix, external=False, lock_path=None): 'method': f.__name__}) retval = f(*args, **kwargs) finally: + LOG.debug(_('Released file lock "%(lock)s" at %(path)s' + ' for method "%(method)s"...'), + {'lock': name, + 'path': lock_file_path, + 'method': f.__name__}) # NOTE(vish): This removes the tempdir if we needed # to create one. This is used to cleanup # the locks left behind by unit tests.