<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run(self):
 """Run the thread, logging everything. If the log_collection is 'none', the log content will not be enqueued """

        for line in iter(self.pipeReader.readline, ''):
            self.orig_stdout.write(line.rstrip() + '\n')
            self.orig_stdout.flush()
            if self.log_collection == 'none':
                # If not match metrics, do not put the line into queue
                if not self.log_pattern.match(line):
                    continue
            self.queue.put(line)
            
        self.pipeReader.close()