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
538cd906
Commit
538cd906
authored
Aug 28, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.1.x'
parents
ff870de0
c2444aec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
LoggingApplicationListener.java
...ingframework/boot/logging/LoggingApplicationListener.java
+8
-7
LoggingApplicationListenerTests.java
...amework/boot/logging/LoggingApplicationListenerTests.java
+5
-0
No files found.
spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java
View file @
538cd906
...
...
@@ -185,19 +185,20 @@ public class LoggingApplicationListener implements SmartApplicationListener {
system
.
initialize
(
value
);
}
catch
(
Exception
ex
)
{
this
.
logger
.
warn
(
"Logging environment value '"
+
value
+
"' cannot be opened and will be ignored"
);
this
.
logger
.
warn
(
"Logging environment value '"
+
value
+
"' cannot be opened and will be ignored (using default location instead)"
);
system
.
initialize
();
}
}
else
{
system
.
initialize
();
if
(
this
.
springBootLogging
!=
null
)
{
initializeLogLevel
(
system
,
this
.
springBootLogging
);
}
}
if
(
this
.
springBootLogging
!=
null
)
{
initializeLogLevel
(
system
,
this
.
springBootLogging
);
}
setLogLevels
(
system
,
environment
);
}
...
...
spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java
View file @
538cd906
...
...
@@ -126,6 +126,11 @@ public class LoggingApplicationListenerTests {
this
.
initializer
.
initialize
(
this
.
context
.
getEnvironment
(),
this
.
context
.
getClassLoader
());
// Should not throw
this
.
logger
.
info
(
"Hello world"
);
String
output
=
this
.
outputCapture
.
toString
().
trim
();
assertTrue
(
"Wrong output:\n"
+
output
,
output
.
contains
(
"Hello world"
));
assertFalse
(
"Wrong output:\n"
+
output
,
output
.
contains
(
"???"
));
assertTrue
(
new
File
(
tmpDir
()
+
"/spring.log"
).
exists
());
}
@Test
...
...
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