Я хочу использовать SLF4j с log4j2, поэтому в моем pom.xml это будет выглядеть так:
Код: Выделить всё
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
org.springframework.boot
spring-boot-starter-parent
3.3.3
com.xxx
yyy
0.0.1-SNAPSHOT
war
OAuth2Server
OAuth2Server
21
org.springframework.boot
spring-boot-starter
org.springframework.boot
spring-boot-starter-logging
org.springframework.boot
spring-boot-starter-oauth2-authorization-server
org.springframework.boot
spring-boot-starter-security
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-log4j2
org.springframework.boot
spring-boot-starter-test
test
org.springframework.security
spring-security-test
test
com.mysql
mysql-connector-j
9.0.0
org.projectlombok
lombok
provided
org.springframework.boot
spring-boot-starter-data-jpa
com.github.ulisesbocchio
jasypt-spring-boot-starter
3.0.5
com.github.spotbugs
spotbugs-annotations
4.8.4
org.apache.commons
commons-lang3
3.15.0
org.springframework.boot
spring-boot-starter-actuator
org.slf4j
slf4j-api
2.0.16
org.apache.logging.log4j
log4j-core
2.24.0
org.apache.logging.log4j
log4j-api
2.24.0
org.apache.logging.log4j
log4j-slf4j2-impl
2.24.0
EppAuthServer
org.sonarsource.scanner.maven
sonar-maven-plugin
4.0.0.4121
org.springframework.boot
spring-boot-maven-plugin
org.springframework.boot
spring-boot-configuration-processor
com.github.ulisesbocchio
jasypt-maven-plugin
3.0.5
maven_central
Maven Central
https://repo.maven.apache.org/maven2/
Код: Выделить всё
AuthServer
${spring:logging.base}/logs
20 MB
Код: Выделить всё
# other config
logging:
base: /opt/tomcat #(for the QA will be /opt/tomcat_qa)
config: classpath:log4j2-spring.xml
Подробнее здесь: https://stackoverflow.com/questions/790 ... g-xml-file
Мобильная версия