Skip to content

Commit 1dc2422

Browse files
authored
1 parent ab0de01 commit 1dc2422

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

docs/guide/devtools.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,25 @@ textual run --dev my_app.py
7272
Anything you `print` from your application will be displayed in the console window. Textual will also write log messages to this window which may be helpful when debugging your application.
7373

7474

75-
### Verbosity
75+
### Increasing verbosity
7676

7777
Textual writes log messages to inform you about certain events, such as when the user presses a key or clicks on the terminal. To avoid swamping you with too much information, some events are marked as "verbose" and will be excluded from the logs. If you want to see these log messages, you can add the `-v` switch.
7878

7979
```bash
8080
textual console -v
8181
```
8282

83+
### Decreasing verbosity
84+
85+
Log messages are classififed in to groups, and the `-x` flag can be used to **exclude** all message from a group. The groups are: `UNDEFINED`, `EVENT`, `DEBUG`, `INFO`, `WARNING`, `ERROR`, `PRINT`, `SYSTEM`, `LOGGING`. The group a message belongs to is printed after its timestamp.
86+
87+
Multiple groups may be excluded, for example to exclude everything except warning, errors, and `print` statements:
88+
89+
```bash
90+
textual console -x SYSTEM -x EVENT -x DEBUG -x INFO
91+
```
92+
93+
8394
## Textual log
8495

8596
In addition to simple strings, Textual console supports [Rich](https://rich.readthedocs.io/en/latest/) formatting. To write rich logs, import `log` as follows:

0 commit comments

Comments
 (0)