Add a logging decorator