title: How to get Spring to print out what spring profiles are active?
body: <p>I am using spring 3.1 profiles and want would like Spring to print out on startup what profiles are active. For example are the first few lines of the output in the log file.</p>
  
  <pre><code>02:59:43,451 INFO  [ContextLoader] Root WebApplicationContext: initialization started
  02:59:43,544 INFO  [XmlWebApplicationContext] Refreshing Root WebApplicationContext: startup date [Sun Dec 30 02:59:43 EST 2012]; root of context hierarchy
  02:59:43,610 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [spring.xml]
  02:59:43,835 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [spring-security.xml]
  02:59:43,971 INFO  [SpringSecurityCoreVersion] You are running with Spring Security Core 3.1.3.RELEASE
  02:59:43,971 INFO  [SecurityNamespaceHandler] Spring Security 'config' module version is 3.1.3.RELEASE
  </code></pre>
  
  <p>What I want to see from spring is something that prints out the version of spring in use along with which profiles are currently active.</p>
  
  <p>How can I get spring to printout it's version and what profiles are active?</p>