logging.config configuration for spring boot -


i wanted configure location of log4j.xml file in spring boot application. have added logging.config property application.properties configuration, indicating log4j.xml file path. seems property ignored. should work accorindg spring boot docs:

logging.config= # location of config file (default classpath:logback.xml logback) 

have did wrong?

spring boot includes starters can used if want exclude or swap specific technical facets. it's using logback default, if you're gonna use log4j add spring-boot-starter-log4j in classpath. example, maven this:

<dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-log4j2</artifactid>             <version>1.2.4.release</version> </dependency> 

and log4j 1.x:

<dependency>             <groupid>org.springframework.boot</groupid>             <artifactid>spring-boot-starter-log4j</artifactid>             <version>1.2.4.release</version> </dependency> 

then add logging.config application.properties:

logging.config = classpath:path/to/log4j.xml 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -