Show More
@@ -307,10 +307,6 class IPKernelApp(BaseIPythonApplication, InteractiveShellApp): | |||
|
307 | 307 | self.hb_port = self.heartbeat.port |
|
308 | 308 | self.log.debug("Heartbeat REP Channel on port: %i" % self.hb_port) |
|
309 | 309 | self.heartbeat.start() |
|
310 | ||
|
311 | # Helper to make it easier to connect to an existing kernel. | |
|
312 | # set log-level to critical, to make sure it is output | |
|
313 | self.log.critical("To connect another client to this kernel, use:") | |
|
314 | 310 | |
|
315 | 311 | def log_connection_info(self): |
|
316 | 312 | """display connection info, and store ports""" |
@@ -323,8 +319,20 class IPKernelApp(BaseIPythonApplication, InteractiveShellApp): | |||
|
323 | 319 | tail += " --profile %s" % self.profile |
|
324 | 320 | else: |
|
325 | 321 | tail = self.connection_file |
|
326 | self.log.critical("--existing %s", tail) | |
|
327 | ||
|
322 | lines = [ | |
|
323 | "To connect another client to this kernel, use:", | |
|
324 | " --existing %s" % tail, | |
|
325 | ] | |
|
326 | # log connection info | |
|
327 | # info-level, so often not shown. | |
|
328 | # frontends should use the %connect_info magic | |
|
329 | # to see the connection info | |
|
330 | for line in lines: | |
|
331 | self.log.info(line) | |
|
332 | # also raw print to the terminal if no parent (`ipython kernel`) | |
|
333 | if not self.parent: | |
|
334 | for line in lines: | |
|
335 | io.rprint(line) | |
|
328 | 336 | |
|
329 | 337 | self.ports = dict(shell=self.shell_port, iopub=self.iopub_port, |
|
330 | 338 | stdin=self.stdin_port, hb=self.hb_port, |
General Comments 0
You need to be logged in to leave comments.
Login now