MCPcopy Create free account
hub / github.com/ipython/ipython / logstop

Method logstop

IPython/core/logger.py:203–215  ·  view source on GitHub ↗

Fully stop logging and close log file. In order to start logging again, a new logstart() call needs to be made, possibly (though not necessarily) with a new filename, mode and other options.

(self)

Source from the content-addressed store, hash-verified

201 self.logfile.flush()
202
203 def logstop(self):
204 """Fully stop logging and close log file.
205
206 In order to start logging again, a new logstart() call needs to be
207 made, possibly (though not necessarily) with a new filename, mode and
208 other options."""
209
210 if self.logfile is not None:
211 self.logfile.close()
212 self.logfile = None
213 else:
214 print("Logging hadn't been started.")
215 self.log_active = False
216
217 # For backwards compatibility, in case anyone was using this.
218 close_log = logstop

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected