def emit(self, record):
self.acquire()<EOL>try:<EOL><INDENT>name = record.levelname.lower()<EOL>self.messages.setdefault(name, [])<EOL>self.messages[name].append(record.getMessage())<EOL><DEDENT>finally:<EOL><INDENT>self.release()<EOL><DEDENT>
Store a message from ``record`` in the instance's ``messages`` dict.