Skip to content

Commit

Permalink
[#10444] Remove slf4j dependency, Add log4j2 logger to Netty
Browse files Browse the repository at this point in the history
  • Loading branch information
emeroad committed Nov 2, 2023
1 parent 3d149f4 commit 419a242
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@
import io.grpc.LoadBalancerRegistry;
import io.grpc.NameResolverProvider;
import io.netty.handler.ssl.SslContext;
import io.netty.util.internal.logging.InternalLoggerFactory;
import io.netty.util.internal.logging.Log4J2LoggerFactory;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

Expand Down Expand Up @@ -113,6 +115,8 @@ protected void configure() {
bind(rpcModuleLifeCycleKey).to(GrpcModuleLifeCycle.class).in(Scopes.SINGLETON);
expose(rpcModuleLifeCycleKey);

InternalLoggerFactory.setDefaultFactory(Log4J2LoggerFactory.INSTANCE);

NettyPlatformDependent nettyPlatformDependent = new NettyPlatformDependent(profilerConfig, System.getProperties());
nettyPlatformDependent.setup();
}
Expand Down

0 comments on commit 419a242

Please sign in to comment.