Log4J2 RollingFileAppender programatically

Solution 1:

While debugging your configuration method, you should read the messages from the status logger. Even better, set its level to DEBUG (you can use -Dlog4j2.debug=true).

You forgot to provide a name for your appender, hence the null:

builder.setName("your_name");