@@ -43,8 +43,19 @@ By default, `cleanup()` removes all temporary files (DB files, logs etc) that we
43
43
44
44
> Note: context managers (aka` with ` ) call` cleanup() ` automatically.
45
45
46
+ Nodes support python logging system, so if you have configured logging
47
+ in your tests, you can use it to redirect postgres logs to yours.
48
+
49
+ To do that, just use` use_logging ` argument:
50
+
51
+ ``` python
52
+ node= testgres.get_new_node(' master' ,use_logging = True )
53
+ ```
54
+
55
+ You can find working configuration example for logging in` tests/test_simple.py ` .
46
56
47
- ###Overview
57
+
58
+ ###Examples
48
59
49
60
Here is an example of what you can do with` testgres ` :
50
61
@@ -104,18 +115,6 @@ To stop the server, run:
104
115
node.stop()
105
116
```
106
117
107
- ###Logging
108
-
109
- Nodes support python logging system, so if you have configured logging
110
- in your tests you can use it to redirect postgres logs to yours.
111
- To do that just use` use_logging ` argument like here:
112
-
113
- ``` python
114
- node= testgres.get_new_node(' master' ,use_logging = True )
115
- ```
116
-
117
- You can find working configuration example for logging in` tests/test_simple.py ` .
118
-
119
118
120
119
###Backup & replication
121
120