mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Logging server
This commit is contained in:
@@ -10,6 +10,7 @@ class BasicApp(App):
|
||||
def on_load(self):
|
||||
self.bind("q", "quit", "Quit")
|
||||
self.bind("d", "dump")
|
||||
self.bind("t", "log_tree")
|
||||
|
||||
def on_mount(self):
|
||||
"""Build layout here."""
|
||||
@@ -38,5 +39,8 @@ class BasicApp(App):
|
||||
def action_dump(self):
|
||||
self.panic(str(self.app.registry))
|
||||
|
||||
def action_log_tree(self):
|
||||
self.log(self.screen.tree)
|
||||
|
||||
|
||||
BasicApp.run(css_file="uber.css", log="textual.log", log_verbosity=1)
|
||||
|
||||
Reference in New Issue
Block a user