title: Tomcat on elastic beanstak: How to change server.xml on elastic beanstalk to disable logging of command line arguments?
body: <p>I have a tomcat app on AWS Elastic beanstalk , As advised <a href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-configuration.html" rel="nofollow noreferrer">here</a> I am using the Environment Properties to set the jdbc connection to database, this parameter includes the user and password for the database.
  The thing is, the tomcat logger is logging all parameters on its startup ,  It looks something like this  </p>
  
  <pre><code>INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -DJDBC_CONNECTION_STRING=jdbc:mysql:///localhost:3306/mydatabase?user=me&amp;password=mypassword
  </code></pre>
  
  <p>I don't want this sensitive data to be on the instance logs. How can I tell Tomcat not to log the command line arguments? 
  {or any other <strong>secure</strong> solution for the problem}</p>
  
  <p>Update:
  So it seems like removing the line
   from Tomcats server.xml does the trick on my local tomcat <a href="https://stackoverflow.com/a/35490522/2421927">(Thanks cyril</a>)</p>
  
  <p>But how do I set this up on Elastic Beanstalk? 
  I tried to create a script in .ebextensions folder with variation on <a href="https://stackoverflow.com/a/30598373/2421927">this</a> but it did not work for me the arguments are still logged. But I am not sure I am using windows and not very familiar with linux scripting. Maybe someone can help me create that script correctly? how can I check if the script ran on the elastic beanstalk instance and if the server.xml changed?</p>