def parse_logs(self): """Parse the contents of the buffer and return an array of log lines.""" return logsutil.ParseLogs(self.contents())
def write(self, line): """Writes a line to the logs buffer.""" logs = logsutil.ParseLogs(line) for log in logs: entry = self.outputjson(log) self.stream().write(entry + '\n')