예제 #1
0
 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()
예제 #2
0
 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()
예제 #3
0
파일: gcapture.py 프로젝트: shishakt/cylc
 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()
예제 #4
0
 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()
예제 #5
0
 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()
예제 #6
0
 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()
예제 #7
0
 def connect(self):
     self.t = Tailer(self.logview, self.path())
     self.t.start()