title: JBoss server.log output customization
body: <p>I have developed a servlet that outputs the server.log file of my JBoss 7.1 for easier debugging.</p>
  
  <p>What i want to do is to customize the output of JBoss and also display from which war each line of output is generated. </p>
  
  <p>To understand better this is a sample output right now:</p>
  
  <p><img src="https://i.stack.imgur.com/CMQ1d.png" alt="server log as a servlet"> </p>
  
  <p>What i want is also to output something that will identify from which deployment this output is coming from.</p>
  
  <p>After the URL in each output i noticed a number after the 7001 port that is different for each deployment, but don't know how to associate that with a war file....</p>
  
  <p>Anyone has an idea how i can do that?</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I found this on the web <a href="http://java.dzone.com/articles/configuring-logging-jboss" rel="nofollow noreferrer">http://java.dzone.com/articles/configuring-logging-jboss</a> about configuring JBoss but sadly is for another version. Here it explains how to have log4j create different log files per deployment. That would be the ultimate solution for me.</p>