Comments (1)
LoggingFactoryBeanCustomizers 类定义
/**
* The {@link LoggingFactoryBeanCustomizer} collection processing class
*
* @author 恒宇少年
*/
public class LoggingFactoryBeanCustomizers {
private List<LoggingFactoryBeanCustomizer> customizers;
public LoggingFactoryBeanCustomizers(List<LoggingFactoryBeanCustomizer> customizers) {
this.customizers = (customizers != null) ? new ArrayList<>(customizers) : Collections.emptyList();
}
/**
* Customize the specified {@link LoggingFactoryBean}. Locates all
* {@link LoggingFactoryBeanCustomizer} beans able to handle the specified instance and
* invoke {@link LoggingFactoryBeanCustomizer#customize(LoggingFactoryBean)} on them.
*
* @param factoryBean the logging factory bean to customize
* @return the factory bean
*/
public LoggingFactoryBean customize(LoggingFactoryBean factoryBean) {
LambdaSafe.callbacks(LoggingFactoryBeanCustomizer.class, this.customizers, factoryBean)
.withLogger(LoggingFactoryBeanCustomizer.class).invoke((customizer) -> customizer.customize(factoryBean));
return factoryBean;
}
}
使用示例
/**
* {@link LoggingFactoryBeanCustomizer}实现类
* 新增排除日志拦截输出的路径
*
* @author 恒宇少年
*/
@Component
@Order(2)
public class AppendIgnorePathCustomizer implements LoggingFactoryBeanCustomizer {
@Override
public void customize(LoggingFactoryBean factoryBean) {
factoryBean.getIgnorePaths().add("/test");
}
}
注意事项:如果存在多个
LoggingFactoryBeanCustomizer
,可以通过@Order
注解来定义执行的顺序,值越小执行越靠前
from api-boot.
Related Issues (20)
- 集成 "message-pipe" 分布式顺序消费管道框架
- 升级Message Pipe版本为v1.0.1 HOT 1
- 修改Banner显示样式,新增输出官网以及博客地址
- 升级message pipe消息管道版本为 v1.0.2.RELESE
- 新增MessagePipeConfiguration配置类的自定义Customizer接口 HOT 1
- apiboot 从2.2.7.RELEASE升级到2.3.0RELEASE版本报错 HOT 1
- api-boot升级2.3.1版本报错 HOT 17
- 集成ssh-agent代理组件 HOT 1
- 自定义Oauth2认证失败响应格式 HOT 1
- refresh_token获取token报Handling error: InvalidGrantException, Invalid refresh token HOT 1
- 已经在ignoring-urls 添加了不需要授权的链接,但访问时候还是提示未授权错误 HOT 1
- 集成druid-spring-boot-starter 1.2.8 ,无法正常登陆,总是提示用户名密码错误,同样的配置在springboot中整合druid-spring-boot-starter 可正常登陆 HOT 4
- 启动报循环依赖错误 HOT 7
- api-boot-starter-logging 导致druid 监控界面无法登陆,提示用户名密码错误 HOT 8
- > 你可以看下我的博客:https://blog.minbox.org/
- 请求指导, api-boot-starter-mybatis-enhance启动报错,执行重载SqlSource失败 HOT 3
- ApiBoot Mybatis Enhance 影响原生mybatis使用??我试着使用xml文件自定义sql的方式,报错Invalid bound statement (not found) HOT 6
- Dependency org.apache.httpcomponents:httpclient, leading to CVE problem
- 支持统一接入飞书、钉钉、企业微信群消息webhook,以及个人工作通知项目发送,OA流程接入等api HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-boot.