no stoplogging param Rocket.stop() called in Rocket.start()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rocket Web Server |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
Rocket has a .start() method. When the server is stopped this method will call the .stop() method without parameters. The .stop() method has an optional parameter stoplogging which is set to True by default.
If rocket is stopped it wil therefore shutdown logging by default.
The documentation says about the .stop() method:
stop(stoploggin
•timeout and close all active connections
•stop all worker and monitor threads
•if the stoplogging parameter is set to False, all logging objects will be preserved should the server be restarted.
The effect of calling .stop(stoploggi
Possible solutions:
- add stoplogging parameter to .start() method (not prefered)
- make the stoplogging parameter a property of the instance
- pass on the value of stoplogging to the .start() method via a shared variable
Looking at the code a restart will also shutdown logging. The param stoplogging is set to default but the termination of the while not tp.stop_server: loop in .start() will call .stop() without param and shutdown logging. The call to .start() in restart() will start the server again but this time logging will fail. I did not test the restart, but looking at the code the effect will be as written above.
version of Rocket 1.2.3
Other possible solution: remove the last line of the .start() method
# return self.stop()