Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "LoggingFactoryBeanCustomizers" #49

Merged
merged 1 commit into from
Aug 3, 2020
Merged

Conversation

hengboy
Copy link
Member

@hengboy hengboy commented Aug 3, 2020

No description provided.

@hengboy
Copy link
Member Author

hengboy commented Aug 3, 2020

Custom LoggingFactoryBean can be customized by implementing the LoggingFactoryBeanCustomizer interface

how to use?

/**
 * {@link LoggingFactoryBeanCustomizer}实现类
 * 新增排除日志拦截输出的路径
 *
 * @author 恒宇少年
 */
@Component
@Order(2)
public class AppendIgnorePathCustomizer implements LoggingFactoryBeanCustomizer {
    @Override
    public void customize(LoggingFactoryBean factoryBean) {
        factoryBean.getIgnorePaths().add("/test");
    }
}

@hengboy
Copy link
Member Author

hengboy commented Aug 3, 2020

LoggingFactoryBeanCustomizers is a unified processing method for the LoggingFactoryBeanCustomizer interface implementation class

@hengboy hengboy merged commit 40c3433 into minbox-projects:2.3.x Aug 3, 2020
@hengboy hengboy self-assigned this Aug 3, 2020
@hengboy hengboy added the kind/feature New features label Aug 3, 2020
@hengboy
Copy link
Member Author

hengboy commented Aug 3, 2020

The order of execution of LoggingFactoryBeanCustomizer can be configured through the @Order annotation,
The smaller the value, the higher the execution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

添加LoggingFactoryBeanCustomizers类来集合注入LoggingFactoryBeanCustomizer实例
1 participant