def emit(self, record):
try:<EOL><INDENT>if self.max_messages:<EOL><INDENT>p = self.redis_client.pipeline()<EOL>p.rpush(self.key, self.format(record))<EOL>p.ltrim(self.key, -self.max_messages, -<NUM_LIT:1>)<EOL>p.execute()<EOL><DEDENT>else:<EOL><INDENT>self.redis_client.rpush(self.key, self.format(record))<EOL><DEDENT><DEDENT>except redis.RedisError:<EOL><INDENT>pass<EOL><DEDENT>
Publish record to redis logging list