Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
9ba7a186
Commit
9ba7a186
authored
Oct 09, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.1.x'
parents
4cf9e045
3b2fb305
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
LoggingApplicationListener.java
...ingframework/boot/logging/LoggingApplicationListener.java
+1
-1
LoggingApplicationListenerTests.java
...amework/boot/logging/LoggingApplicationListenerTests.java
+12
-0
No files found.
spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
View file @
9ba7a186
...
...
@@ -224,7 +224,7 @@ public class LoggingApplicationListener implements SmartApplicationListener {
for
(
Entry
<
String
,
Object
>
entry
:
levels
.
entrySet
())
{
String
name
=
entry
.
getKey
();
try
{
LogLevel
level
=
LogLevel
.
valueOf
(
en
try
.
getValue
().
toString
(
));
LogLevel
level
=
LogLevel
.
valueOf
(
en
vironment
.
resolvePlaceholders
(
entry
.
getValue
().
toString
()
));
if
(
name
.
equalsIgnoreCase
(
"root"
))
{
name
=
null
;
}
...
...
spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java
View file @
9ba7a186
...
...
@@ -204,6 +204,18 @@ public class LoggingApplicationListenerTests {
assertThat
(
this
.
outputCapture
.
toString
(),
containsString
(
"testattrace"
));
}
@Test
public
void
parseLevelsWithPlaceholder
()
throws
Exception
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
"foo=TRACE"
,
"logging.level.org.springframework.boot=${foo}"
);
this
.
initializer
.
initialize
(
this
.
context
.
getEnvironment
(),
this
.
context
.
getClassLoader
());
this
.
logger
.
debug
(
"testatdebug"
);
this
.
logger
.
trace
(
"testattrace"
);
assertThat
(
this
.
outputCapture
.
toString
(),
containsString
(
"testatdebug"
));
assertThat
(
this
.
outputCapture
.
toString
(),
containsString
(
"testattrace"
));
}
@Test
public
void
parseLevelsFails
()
throws
Exception
{
EnvironmentTestUtils
.
addEnvironment
(
this
.
context
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment