jina
jina copied to clipboard
Executor's logger doesn't work with square brackets surrounded ([{foo}]) "f-string" formatting
Describe the bug
class FooGenerator(Executor):
@requests(on='/')
def generate(self, docs: DocumentArray, **kwargs):
t = 'foo'
self.logger.info(f'formatting "{t}"...')
self.logger.info(f'formatting [{t}]...')
print(f'formatting [{t}]...')
f = Flow().add(uses=FooGenerator)
with f:
f.post(on='/')
above code generates following output
INFO FooGenerator@93844 formatting "foo"... [08/04/22 14:54:06]
INFO FooGenerator@93844 formatting ...
formatting [foo]...
2nd line should be INFO FooGenerator@93844 formatting [foo]...
upstream rich problem please raise a PR there