Skip to content

Log4j2 is connected to NACOS to realize real-time hot loading configuration

Notifications You must be signed in to change notification settings

Musknine/log4j2-nacos-spring-boot-starter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log4j2-nacos-spring-boot-starter

参考:log4j 动态化配置

此插件实现了利用Nacos实现Log4j2实现log配置文件动态加载

在Nacos 增加需要动态刷新的Log4J2配置

具体使用

[
  {
    "name":"ROOT",
    "level":"info"
  },
  {
    "name":"org.andot.log4j2.nacos",
    "level":"debug"
  }
]

这个示例是用来修改 打印日志等级,在项目启动中,如果修改 org.andot.log4j2.nacos 包的 level 为 error, 那这个org.andot.log4j2.nacos 包下面的log.debug("hello"); 就不会打印hello

About

Log4j2 is connected to NACOS to realize real-time hot loading configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%