title: Log4j2: Dynamic creation of log files for multiple logs
body: <p>I am currently creating a system that can have modules (think of them as plugins), where each one of them can have their own log, dedicated.</p>
  
  <p>I would like to use the log4j2 project for logging, but I seem to have some trouble with the file appenders.</p>
  
  <p>The main project (the module loader and "core" of the whole thing) should have its own log file, while the modules should have their own (like <code>mod_XXXXXXXX.log</code>).</p>
  
  <p>By reading the documentation about the appenders I discovered the <code>FileAppender</code> class, and I was going to use that. Until I found out that I can't just simple add the appender to the default logger created by <code>LogManager.getLog()</code>.</p>
  
  <p>The logger returned by the LogManager is a different logger than the <code>Logger</code> interface.</p>
  
  <p>Even searching did not give me any near solution, all I found was predefined file logs in the xml configuration - which is not what I want.</p>
  
  <p>Thank you for reading; even the slightest clue is welcome :)</p>