Flask-HAL icon indicating copy to clipboard operation
Flask-HAL copied to clipboard

Add __str__ method to Document class

Open inirudebwoy opened this issue 7 years ago • 0 comments

It is helpful when passing object to logger utilities.

We are using this library and it saves us a lot of time. However when Document objects are passed into logger calls to_dict needs to be called so it provides some information about the object.

With this change you can do:

logger.debug('My document is %s', Document({'foo': 'bar}))

inirudebwoy avatar May 25 '18 12:05 inirudebwoy