Handler

Sometimes called Appender, the handlers are the output implementations. They are the ones receiving the LogRecord of the previous part and doing something with it.

The most common implementations are:

  • The FileHandler : Outputs the messages in a file.
  • A MailHandler : Sends the messages by mail. This is a particular handler that should not be used for a high volume of messages but it can be used with a particular logger dedicated to sending some messages under specific circumstances.
  • The ConsoleHandler to output messages into the console.
  • There are more, such as JMSHandler, ElasticsearchHandler, HTTPHandler, and so on.

In any case, the handlers are sending data to a backend which can be anything, and the logging framework always ensures ...

Get Java EE 8 High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.