def callback(self, filename, lines, **kwargs):
self._logger.debug('<STR_LIT>')<EOL>timestamp = self.get_timestamp(**kwargs)<EOL>if kwargs.get('<STR_LIT>', False):<EOL><INDENT>del kwargs['<STR_LIT>']<EOL><DEDENT>namespaces = self._beaver_config.get_field('<STR_LIT>', filename)<EOL>if not namespaces:<EOL><INDENT>namespaces = self._namespace<EOL><DEDENT>namespaces = namespaces.split("<STR_LIT:U+002C>")<EOL>self._logger.debug('<STR_LIT>'.join(namespaces))<EOL>data_type = self._data_type<EOL>self._logger.debug('<STR_LIT>' + data_type)<EOL>server = self._get_next_server()<EOL>self._logger.debug('<STR_LIT>' + server['<STR_LIT:url>'])<EOL>pipeline = server['<STR_LIT>'].pipeline(transaction=False)<EOL>callback_map = {<EOL>self.LIST_DATA_TYPE: pipeline.rpush,<EOL>self.CHANNEL_DATA_TYPE: pipeline.publish,<EOL>}<EOL>callback_method = callback_map[data_type]<EOL>for line in lines:<EOL><INDENT>for namespace in namespaces:<EOL><INDENT>callback_method(<EOL>namespace.strip(),<EOL>self.format(filename, line, timestamp, **kwargs)<EOL>)<EOL><DEDENT><DEDENT>try:<EOL><INDENT>pipeline.execute()<EOL><DEDENT>except redis.exceptions.RedisError as exception:<EOL><INDENT>self._logger.warn('<STR_LIT>' + server['<STR_LIT:url>'])<EOL>raise TransportException(exception)<EOL><DEDENT>
Sends log lines to redis servers