Textualize / textual

The lean application framework for Python. Build sophisticated user interfaces with a simple Python API. Run your apps in the terminal and a web browser.
https://textual.textualize.io/
MIT License
24.07k stars 741 forks source link

Using standard python logger #4663

Closed takeda closed 1 week ago

takeda commented 2 weeks ago

Is there a reason why textual implements its own logging?

Would it be possible to use standard python logger, and have an option to redirect log via Textual LogHandler? I feel like that would be better, as it is more powerful, allows to pass context variables and most importantly it is standardized.

github-actions[bot] commented 2 weeks ago

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

willmcgugan commented 1 week ago

Textual's log methods can log things that aren't necessarily strings.

You can use Python's logging system in your app. You can write to the dev tools with https://textual.textualize.io/guide/devtools/#textual-log, or configure it in any way you wish

github-actions[bot] commented 1 week ago

Don't forget to star the repository!

Follow @textualizeio for Textual updates.