Fixes #230. Also made logging facility use calling method as context.