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
This commit is contained in:
Joe Gordon 2013-01-09 18:49:12 -08:00
parent 30b597b322
commit e6068bd62b
1 changed files with 5 additions and 0 deletions

View File

@ -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.