Skip to content

Commit ea9ec72

Browse files
committed
update readme
1 parent 97a4287 commit ea9ec72

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,6 @@ except RuntimeError as exc:
9595
logger.error('The front fell off.\n' + tb)
9696
```
9797

98-
It's also possible to integrate this neatly with standard logging calls [through a bit of extra plumbing](https://github.com/cknd/stackprinter/blob/master/demo_logging.py).
99-
100-
```python
101-
configure_logging() # adds a custom log formatter, see link above
102-
103-
try:
104-
something()
105-
except:
106-
logger.exception('The front fell off.') # Logs a rich traceback along with the given message
107-
```
108-
10998
For all the config options [see the docstring of `format()`](https://github.com/cknd/stackprinter/blob/master/stackprinter/__init__.py#L28-L149).
11099
The same config kwargs are accepted by `format()`, `show()` and `set_excepthook()`. They allow you to tweak the formatting, hide certain variables by name, skip variables in calls within certain files, and some other stuff.
111100

@@ -119,6 +108,17 @@ except RuntimeError as exc:
119108
```
120109

121110

111+
It's also possible to integrate this neatly with standard logging calls [through a bit of extra plumbing](https://github.com/cknd/stackprinter/blob/master/demo_logging.py).
112+
113+
```python
114+
configure_logging() # adds a custom log formatter, see link above
115+
116+
try:
117+
something()
118+
except:
119+
logger.exception('The front fell off.') # Logs a rich traceback along with the given message
120+
```
121+
122122

123123
## Printing the current call stack
124124
To see your own thread's current call stack, call `show` or `format` anywhere outside of exception handling.

0 commit comments

Comments
 (0)