How to read Logback configuration file from path outside the war file?

前端 未结 2 841
情书的邮戳
情书的邮戳 2021-01-23 12:19

I have a requirement where I want to place all logback configuration outside the war file. Presently I have placed my configuration file (logback.xml) on the classpath. I am usi

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-23 13:01

    Go into the jboss startup/run script and add this option:

    java -Dlogback.configurationFile=/path/to/config.xml chapters.configuration.MyApp1

    see more at http://logback.qos.ch/manual/configuration.html

提交回复
热议问题