Skip to content

Commit 966e630

Browse files
authored
debug_guide for python SDK (Azure#19716)
1 parent 47acc05 commit 966e630

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

doc/dev/debug_guide.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Debug
2+
3+
This guide is to help Python SDK users to get the process about how SDK call REST api
4+
5+
(1) Copy the following code in your .py file
6+
```
7+
import sys
8+
import logging
9+
10+
logger = logging.getLogger('')
11+
logger.setLevel(logging.DEBUG)
12+
handler = logging.StreamHandler(stream=sys.stdout, )
13+
logger.addHandler(handler)
14+
formatter = logging.Formatter(
15+
'%(asctime)s - %(name)s - %(levelname)s - %(message)s')
16+
handler.setFormatter(formatter)
17+
```
18+
19+
![Position example](./debug_guide_position.png "Position example")
20+
21+
(2) Run your .py program and you could find the log info in screen. It is convenient to get the process about how SDK call REST api:
22+
23+
![example](./debug_guide_example.png "example")

doc/dev/debug_guide_example.png

179 KB
Loading

doc/dev/debug_guide_position.png

41.4 KB
Loading

0 commit comments

Comments
 (0)