Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-cloud-netflix
Project
Overview
Details
Activity
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
openSource
spring-cloud-netflix
Commits
7fcc559e
Commit
7fcc559e
authored
Oct 12, 2015
by
Spencer Gibb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove blitz4j
fixes gh-527
parent
f878cfcf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
52 deletions
+0
-52
pom.xml
pom.xml
+0
-6
pom.xml
spring-cloud-netflix-eureka-server/pom.xml
+0
-4
EurekaServerInitializerConfiguration.java
...x/eureka/server/EurekaServerInitializerConfiguration.java
+0
-39
Log4JLoggingSystemTests.java
.../cloud/netflix/eureka/server/Log4JLoggingSystemTests.java
+0
-3
No files found.
pom.xml
View file @
7fcc559e
...
...
@@ -265,12 +265,6 @@
<artifactId>
xstream
</artifactId>
<version>
1.4.2
</version>
</dependency>
<!-- Eureka server dep that is now optional -->
<dependency>
<groupId>
com.netflix.blitz4j
</groupId>
<artifactId>
blitz4j
</artifactId>
<version>
1.36.0
</version>
</dependency>
<dependency>
<groupId>
com.netflix.feign
</groupId>
<artifactId>
feign-core
</artifactId>
...
...
spring-cloud-netflix-eureka-server/pom.xml
View file @
7fcc559e
...
...
@@ -47,10 +47,6 @@
<artifactId>
eureka-client
</artifactId>
</dependency>
<dependency>
<groupId>
com.netflix.blitz4j
</groupId>
<artifactId>
blitz4j
</artifactId>
</dependency>
<dependency>
<groupId>
com.sun.jersey
</groupId>
<artifactId>
jersey-servlet
</artifactId>
</dependency>
...
...
spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerInitializerConfiguration.java
View file @
7fcc559e
...
...
@@ -20,9 +20,7 @@ import java.io.IOException;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Method
;
import
java.lang.reflect.Modifier
;
import
java.util.Properties
;
import
javax.annotation.PostConstruct
;
import
javax.servlet.ServletContext
;
import
javax.servlet.ServletContextEvent
;
...
...
@@ -34,7 +32,6 @@ import org.springframework.aop.framework.ProxyFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnClass
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.logging.LoggingSystem
;
import
org.springframework.boot.logging.log4j.Log4JLoggingSystem
;
import
org.springframework.cloud.netflix.eureka.EurekaServerConfigBean
;
import
org.springframework.cloud.netflix.eureka.server.advice.LeaseManagerLite
;
...
...
@@ -49,13 +46,9 @@ import org.springframework.context.annotation.Bean;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.core.io.support.PropertiesLoaderUtils
;
import
org.springframework.util.ClassUtils
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.context.ServletContextAware
;
import
com.netflix.blitz4j.DefaultBlitz4jConfig
;
import
com.netflix.blitz4j.LoggingConfiguration
;
import
com.netflix.discovery.EurekaClient
;
import
com.netflix.eureka.AbstractInstanceRegistry
;
import
com.netflix.eureka.EurekaBootStrap
;
...
...
@@ -92,37 +85,6 @@ public class EurekaServerInitializerConfiguration
this
.
servletContext
=
servletContext
;
}
@PostConstruct
public
void
initLogging
()
{
if
(!(
LoggingSystem
.
get
(
ClassUtils
.
getDefaultClassLoader
())
instanceof
Log4JLoggingSystem
))
{
LoggingConfiguration
off
=
new
LoggingConfiguration
()
{
@Override
public
void
configure
()
{
}
};
Field
instance
=
ReflectionUtils
.
findField
(
LoggingConfiguration
.
class
,
"instance"
);
ReflectionUtils
.
makeAccessible
(
instance
);
ReflectionUtils
.
setField
(
instance
,
null
,
off
);
Field
blitz4j
=
ReflectionUtils
.
findField
(
LoggingConfiguration
.
class
,
"blitz4jConfig"
);
ReflectionUtils
.
makeAccessible
(
blitz4j
);
try
{
Properties
props
=
PropertiesLoaderUtils
.
loadAllProperties
(
new
ClassPathResource
(
"log4j.properties"
,
Log4JLoggingSystem
.
class
).
toString
());
DefaultBlitz4jConfig
blit4jConfig
=
new
DefaultBlitz4jConfig
(
props
);
ReflectionUtils
.
setField
(
blitz4j
,
off
,
blit4jConfig
);
}
catch
(
IOException
e
)
{
}
}
}
@Override
public
void
start
()
{
new
Thread
(
new
Runnable
()
{
...
...
@@ -143,7 +105,6 @@ public class EurekaServerInitializerConfiguration
catch
(
IOException
ex
)
{
// ignore
}
LoggingConfiguration
.
getInstance
().
configure
();
EurekaServerConfigurationManager
.
getInstance
()
.
setConfiguration
(
EurekaServerInitializerConfiguration
.
this
.
eurekaServerConfig
);
...
...
spring-cloud-netflix-eureka-server/src/test/java/org/springframework/cloud/netflix/eureka/server/Log4JLoggingSystemTests.java
View file @
7fcc559e
...
...
@@ -31,8 +31,6 @@ import org.springframework.core.env.StandardEnvironment;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.util.StringUtils
;
import
com.netflix.blitz4j.LoggingConfiguration
;
import
static
org
.
hamcrest
.
Matchers
.
equalTo
;
import
static
org
.
junit
.
Assert
.
assertThat
;
...
...
@@ -56,7 +54,6 @@ public class Log4JLoggingSystemTests {
System
.
setProperty
(
"log4j.configuration"
,
new
ClassPathResource
(
"log4j.properties"
,
Log4JLoggingSystem
.
class
).
getURL
().
toString
());
this
.
logger
=
Logger
.
getLogger
(
getClass
());
LoggingConfiguration
.
getInstance
().
configure
();
}
@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