|
Java™ by example!
|
|
|
How do I write my own LogHandler?
Just inherit from one of the existing handlers or inherit from the abstract class Handler. The following is a simple example that creates an EmailHandler. Specify the from-address, the to-address and the internal buffer size. When the amount of log messages reaches this size, an email is created and sent to the to-address. Main.java:
EmailHandler.java:
SMTPEmail.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|