def connect(self): """Connect to the selected log file tailer.""" try: cmd_tmpl = self.cmd_tmpls[self.filename] except (KeyError, TypeError): cmd_tmpl = None self.t = Tailer(self.logview, self.filename, cmd_tmpl=cmd_tmpl) self.t.start()
def connect(self): """Run the tailer command.""" cmd = self.cmd_tmpl % {'rotation': self.rotation, 'suite_name': self.suite_name, 'suite_log': self.suite_log} self.t = Tailer( self.logview, cmd, filters=[f for f in [self.task_filter, self.custom_filter] if f]) self.t.start()
def run(self): proc = Popen( self.command, stdin=open(os.devnull), stdout=self.stdoutfile, stderr=STDOUT, shell=True) self.proc = proc gobject.timeout_add(40, self.pulse_proc_progress) tail_cmd_tmpl = glbl_cfg().get_host_item("tail command template") tail_cmd = tail_cmd_tmpl % {'filename': self.stdoutfile.name} self.stdout_updater = Tailer(self.textview, tail_cmd, pollable=proc) self.stdout_updater.start()
def connect(self): """Connect to the selected log file tailer.""" cmd = self.cmd_tmpl % { 'subnum': self.nsubmit, 'suite_name': self.suite_name, 'task_id': self.task_id, 'job_log': self.choice } self.log_label.set_text(self.choice) self.t = Tailer(self.logview, cmd) self.t.start()
def update_view(self): self.t.stop() logbuffer = self.logview.get_buffer() s, e = logbuffer.get_bounds() self.reset_logbuffer() logbuffer.delete(s, e) self.log_label.set_text(self.path()) self.t = Tailer( self.logview, self.path(), filters=[f for f in [self.task_filter, self.custom_filter] if f]) self.t.start()
def run(self): proc = None if not self.ignore_command: proc = subprocess.Popen( self.command, stdout=self.stdout, stderr=subprocess.STDOUT, shell=True) self.proc = proc gobject.timeout_add(40, self.pulse_proc_progress) self.stdout_updater = Tailer( self.textview, self.stdout.name, pollable=proc) self.stdout_updater.start()
def connect(self): self.t = Tailer(self.logview, self.path()) self.t.start()