title: Log4j2 separate log files by module name
body: <p>I want to write log files based on module name. 
  for ex. 
  one log file for user management module and 
  one for products module etc.</p>
  
  <p>My project package structure looks like below;</p>
  
  <pre><code>com.mycompany.service.user
  com.mycompany.service.product
  com.mycompany.controller.user
  com.mycompany.controller.product
  ...
  </code></pre>
  
  <p>I want to write log messages from 
  <code>com.mycompany.*.user</code> <em>(com.mycompany.service.user and com.mycompany.controller.user)</em> to <code>com.mycompany.user.log</code> file, 
  and <code>com.mycompany.*.product</code> to <code>com.mycompany.user.log</code> file.</p>
  
  <p>I know I can create loggers like bellow</p>
  
  <pre><code>&lt;logger name="com.mycompany.service.user" level="INFO"&gt;
    &lt;AppenderRef ref="AppenderUsers" /&gt;
  &lt;/logger&gt;
  &lt;logger name="com.mycompany.controller.user" level="INFO"&gt;
    &lt;AppenderRef ref="AppenderUsers" /&gt;
  &lt;/logger&gt;
  ...
  </code></pre>
  
  <p>But this way I have to add so many loggers.
  Cant I use wildcard <code>*</code> or <code>**</code> or regex to logger name somethihng like this?</p>
  
  <pre><code>&lt;logger name="com.mycompany.*.user" level="INFO"&gt;
    &lt;AppenderRef ref="AppenderUsers" /&gt;
  &lt;/logger&gt;
  </code></pre>
  
  <p>Or is there any way to do this?</p>