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
8bf3f275
Commit
8bf3f275
authored
Jul 18, 2016
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.3.x'
parents
e03e1098
49676ee9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
+14
-12
pom.xml
spring-boot-dependencies/pom.xml
+1
-1
TomcatEmbeddedServletContainerFactory.java
...mbedded/tomcat/TomcatEmbeddedServletContainerFactory.java
+4
-5
Log4J2LoggingSystem.java
...ingframework/boot/logging/log4j2/Log4J2LoggingSystem.java
+2
-6
Log4J2LoggingSystemTests.java
...amework/boot/logging/log4j2/Log4J2LoggingSystemTests.java
+7
-0
No files found.
spring-boot-dependencies/pom.xml
View file @
8bf3f275
...
@@ -87,7 +87,7 @@
...
@@ -87,7 +87,7 @@
<hikaricp.version>
2.4.7
</hikaricp.version>
<hikaricp.version>
2.4.7
</hikaricp.version>
<hikaricp-java6.version>
2.3.13
</hikaricp-java6.version>
<hikaricp-java6.version>
2.3.13
</hikaricp-java6.version>
<hornetq.version>
2.4.7.Final
</hornetq.version>
<hornetq.version>
2.4.7.Final
</hornetq.version>
<hsqldb.version>
2.3.
4
</hsqldb.version>
<hsqldb.version>
2.3.
3
</hsqldb.version>
<htmlunit.version>
2.21
</htmlunit.version>
<htmlunit.version>
2.21
</htmlunit.version>
<httpasyncclient.version>
4.1.2
</httpasyncclient.version>
<httpasyncclient.version>
4.1.2
</httpasyncclient.version>
<httpclient.version>
4.5.2
</httpclient.version>
<httpclient.version>
4.5.2
</httpclient.version>
...
...
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java
View file @
8bf3f275
...
@@ -693,7 +693,8 @@ public class TomcatEmbeddedServletContainerFactory
...
@@ -693,7 +693,8 @@ public class TomcatEmbeddedServletContainerFactory
/**
/**
* {@link LifecycleListener} that stores an empty merged web.xml. This is critical for
* {@link LifecycleListener} that stores an empty merged web.xml. This is critical for
* Jasper to prevent warnings about missing web.xml files and to enable EL.
* Jasper on Tomcat 7 to prevent warnings about missing web.xml files and to enable
* EL.
*/
*/
private
static
class
StoreMergedWebXmlListener
implements
LifecycleListener
{
private
static
class
StoreMergedWebXmlListener
implements
LifecycleListener
{
...
@@ -708,10 +709,8 @@ public class TomcatEmbeddedServletContainerFactory
...
@@ -708,10 +709,8 @@ public class TomcatEmbeddedServletContainerFactory
private
void
onStart
(
Context
context
)
{
private
void
onStart
(
Context
context
)
{
ServletContext
servletContext
=
context
.
getServletContext
();
ServletContext
servletContext
=
context
.
getServletContext
();
if
(
servletContext
if
(
servletContext
.
getAttribute
(
MERGED_WEB_XML
)
==
null
)
{
.
getAttribute
(
StoreMergedWebXmlListener
.
MERGED_WEB_XML
)
==
null
)
{
servletContext
.
setAttribute
(
MERGED_WEB_XML
,
getEmptyWebXml
());
servletContext
.
setAttribute
(
StoreMergedWebXmlListener
.
MERGED_WEB_XML
,
getEmptyWebXml
());
}
}
TomcatResources
.
get
(
context
).
addClasspathResources
();
TomcatResources
.
get
(
context
).
addClasspathResources
();
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java
View file @
8bf3f275
...
@@ -130,13 +130,13 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
...
@@ -130,13 +130,13 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
@Override
@Override
public
void
beforeInitialize
()
{
public
void
beforeInitialize
()
{
super
.
beforeInitialize
();
super
.
beforeInitialize
();
get
RootLoggerConfig
().
addFilter
(
FILTER
);
get
LoggerContext
().
getConfiguration
().
addFilter
(
FILTER
);
}
}
@Override
@Override
public
void
initialize
(
LoggingInitializationContext
initializationContext
,
public
void
initialize
(
LoggingInitializationContext
initializationContext
,
String
configLocation
,
LogFile
logFile
)
{
String
configLocation
,
LogFile
logFile
)
{
get
RootLoggerConfig
().
removeFilter
(
FILTER
);
get
LoggerContext
().
getConfiguration
().
removeFilter
(
FILTER
);
super
.
initialize
(
initializationContext
,
configLocation
,
logFile
);
super
.
initialize
(
initializationContext
,
configLocation
,
logFile
);
}
}
...
@@ -204,10 +204,6 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
...
@@ -204,10 +204,6 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
return
new
ShutdownHandler
();
return
new
ShutdownHandler
();
}
}
private
LoggerConfig
getRootLoggerConfig
()
{
return
getLoggerContext
().
getConfiguration
().
getLoggerConfig
(
""
);
}
private
LoggerConfig
getLoggerConfig
(
String
name
)
{
private
LoggerConfig
getLoggerConfig
(
String
name
)
{
name
=
(
StringUtils
.
hasText
(
name
)
?
name
:
LogManager
.
ROOT_LOGGER_NAME
);
name
=
(
StringUtils
.
hasText
(
name
)
?
name
:
LogManager
.
ROOT_LOGGER_NAME
);
return
getLoggerContext
().
getConfiguration
().
getLoggers
().
get
(
name
);
return
getLoggerContext
().
getConfiguration
().
getLoggers
().
get
(
name
);
...
...
spring-boot/src/test/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystemTests.java
View file @
8bf3f275
...
@@ -194,6 +194,13 @@ public class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
...
@@ -194,6 +194,13 @@ public class Log4J2LoggingSystemTests extends AbstractLoggingSystemTests {
assertThat
(
fileContents
).
is
(
Matched
.
by
(
expectedOutput
));
assertThat
(
fileContents
).
is
(
Matched
.
by
(
expectedOutput
));
}
}
@Test
public
void
beforeInitializeFilterDisablesErrorLogging
()
throws
Exception
{
this
.
loggingSystem
.
beforeInitialize
();
assertThat
(
this
.
logger
.
isErrorEnabled
()).
isFalse
();
this
.
loggingSystem
.
initialize
(
null
,
null
,
getLogFile
(
null
,
tmpDir
()));
}
@Test
@Test
public
void
customExceptionConversionWord
()
throws
Exception
{
public
void
customExceptionConversionWord
()
throws
Exception
{
System
.
setProperty
(
"LOG_EXCEPTION_CONVERSION_WORD"
,
"%ex"
);
System
.
setProperty
(
"LOG_EXCEPTION_CONVERSION_WORD"
,
"%ex"
);
...
...
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