java - logback xml configuration for web application -


i using logback slf4j logging debug/error statements. please let me know how use single logback.xml configuration file multiple environments (dev/qa/prod)? right now, editing xml file each environment specify dbname...i appreciate help.

couple of options (most of them documented here)

  1. use properties in log configuration set externally (either java properties or os environment variables)
  2. use jndi settings (creating db datasources pretty common)
  3. generate logback.xml file part of deployment process
  4. jmx configurator allows reload configuration named file
  5. package war file each environment (don't recommend included completeness)

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

visual studio - TFS will not accept changes I've made to a Java project -