| skipped 131 lines |
132 | 132 | | |
133 | 133 | | def __exit__(self, exc_type, exc_value, tb): |
134 | 134 | | """ |
135 | | - | Allows the engine to be used as a context manager; simply stops the engine |
136 | | - | if enabled. |
| 135 | + | Allows the engine to be used as a context manager |
| 136 | + | Stops the engine if enabled and closes loggers. |
137 | 137 | | """ |
| 138 | + | for handler in self.logger.handlers: |
| 139 | + | handler.close() |
138 | 140 | | if self.enabled: |
139 | 141 | | self.shutdown_nfqueue() |
140 | 142 | | |
| skipped 330 lines |