File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -48,13 +48,10 @@ testgres supports [python logging](https://docs.python.org/3.6/library/logging.h
4848which means that you can aggregate logs from several nodes into one file:
4949
5050``` python
51- import io
5251import logging
5352
5453# write everything to /tmp/testgres.log
55- logfile = io.open(' /tmp/testgres.log' , ' w' )
56- logger = logging.getLogger(' testgres' )
57- logger.FileHandler(logfile)
54+ logging.basicConfig(filename = ' /tmp/testgres.log' )
5855
5956# create two different nodes with logging
6057node1 = testgres.get_new_node(' node1' , use_logging = True ).init().start()
@@ -71,8 +68,6 @@ node2.execute('postgres', 'select 2')
7168Here is an example of what you can do with ` testgres ` :
7269
7370``` python
74- import testgres
75-
7671with testgres.get_new_node(' test' ) as node:
7772 node.init() # run initdb
7873 node.start() # start PostgreSQL
You can’t perform that action at this time.
0 commit comments