Skip to content

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