Create a custom appender to log events in a custom format by using log4j classes.
A custom appender can use any log4j appender class and you can specify multiple properties for the appender.
The built-in appenders have hidden properties that you cannot modify. A custom appender is an appender that either has a class that does not match a built-in appender class or a property that does not match the hidden properties of the built-in class. For example, the Rolling File appender has a hidden encoding property set to UTF-8. You can create a custom rolling file appender that has a different encoding property.
The following image shows a custom appender that uses the console appender class:
You can specify the name, layout pattern, type, target, layout type, and appender class properties in the custom appender.