-# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved.
+# Copyright 2001-2004 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
"""
self.buffer = []
+ def close(self):
+ """
+ Close the handler.
+
+ This version just flushes and chains to the parent class' close().
+ """
+ self.flush()
+ logging.Handler.close(self)
+
class MemoryHandler(BufferingHandler):
"""
A handler class which buffers logging records in memory, periodically
"""
self.flush()
self.target = None
- self.buffer = []
BufferingHandler.close(self)