I have tried different ways to configure logging in spring boot and took the help of different blogs but nothing seems to be working for me. I have specified log4j.properties in src/main/reosurces folder and executing the application, It creates the logs for me. BUT when I use external log4j.properties and provide below property while executing my application by jar
-Dlogging.config=/path/to/log4j.properties The log file is not getting generated. Below is snippet of my build.gradle file.
configurations.all { exclude group: 'com.sun.jdmk', module: 'jmxtools' exclude group: 'com.sun.jmx', module: 'jmxri' exclude group: 'ch.qos.logback', module: 'logback-classic' } What am I missing here ?
log4j.propertiesisn't really going to help. You can specify log level simply in theapplication.properties. What is so special you need your own properties fie?