Include the application name on each log line when it is available
Update Logback and Log4J2 so that they include the application name on each log line. If `spring.application.name` had not been set, or if `logging.include-application-name` is `false` then the name is not logged. Closes gh-35593
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
spring.application.name=sample
|
||||
spring.security.user.name=user
|
||||
spring.security.user.password=password
|
||||
management.endpoint.shutdown.enabled=true
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Configuration status="WARN" monitorInterval="30">
|
||||
<Properties>
|
||||
<Property name="PID">????</Property>
|
||||
<Property name="LOG_PATTERN">%clr{%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}}{faint} %clr{%5p} %clr{${sys:PID}}{magenta} %clr{---}{faint} %clr{[%15.15t]}{faint} %clr{%-40.40c{1.}}{cyan} %clr{:}{faint} %m%n%xwEx</Property>
|
||||
<Property name="LOG_PATTERN">%clr{%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}}{faint} %clr{%5p} %clr{${sys:PID}}{magenta} %clr{---}{faint} %clr{${sys:LOGGED_APPLICATION_NAME:-}[%15.15t]}{faint} %clr{%-40.40c{1.}}{cyan} %clr{:}{faint} %m%n%xwEx</Property>
|
||||
</Properties>
|
||||
<Appenders>
|
||||
<Console name="Console" target="SYSTEM_OUT" follow="true">
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
spring.application.name=sample
|
||||
service.name=Phil
|
||||
|
||||
spring.security.user.name=user
|
||||
|
||||
Reference in New Issue
Block a user