How to use Logger's MemoryHandler class?
In this example we demo the use of
to log only when some conditions happen in our application, for example when a
Level.SEVERE message is logged.
We create an instance of
MemoryHandler that will delegate the log to
FileHandler class and it logs the last 100 record until a
message is logged.
To check if the message is logged you can open the
created by this small program.