As for filters, there are several formatters, and since it is really about how to convert the log record—the logging API—to the backend representation (String), then it can be more or less pricey. To get a high-level idea about that, here are some examples:
- XML: Convert the log record to an XML representation; it generally uses string concatenation and logs all the record information (logger, thread, message, class, and so on).
- Simple: Just the log level and the message.
- Pattern: Based on a configured pattern, the output is computed. Generally, the logging frameworks allows you to include, in this pattern, the thread identifier or name, the message, the log level, the class, the method, the exception if there is one, and so on. ...