当前位置:网站首页>Introduction to logback filter
Introduction to logback filter
2022-07-29 07:24:00 【qq_ twenty-five million seventy-three thousand two hundred and 】
from :
logback filter Filter introduction
The following is about logback in filter Introduction and description of filter , As shown below :
Logback Two types are available Filter Regular Filter; Turbo Filter
Regular Filter be used for appeder On
Appender An instance can be bound Regular Filter Instance chain
Regular Filter Inheritance implementation ”ch.qos.logback.core.filter.Filter” class
Customize your own regular filter Need to inherit ch.qos.logback.core.filter.Filter class , And implement decide() Method
TurboFilter Object bound to logging context
Available for a given appender Call them when
Log requests are issued every time
It can be found in LoggingEvent Called before the object is created
TurboFilter Object does not need to instantiate logging events to filter logging requests
turbo Filters are designed for high-performance filtering of recorded events , Even before creating the event
To implement this type of filter Need to inherit ch.qos.logback.classic.turbo.TurboFilter
logback There is 3 A common filter
LevelFilter Grade filter , Filter by log level When the log level is equal to the configuration level , The filter will be based on onMath and onMismatch Receive or reject logs LevelFilter Filter events based on precise level matching When the level of the event is equal to the configured level , The filter accepts or rejects the event , Depending on onMatch and onMismatch Configuration of properties EvaluatorFilter Evaluation filters , assessment 、 Identify whether the log meets the specified conditions EventEvaluator Will evaluate whether a given event meets a given condition In case of match and mismatch , trusteeship EvaluatorFilter Will be returned separately onMatch or onMismatch Property Please note that ,EventEvaluator Is an abstract class . You can do this by EventEvaluator Subclass to implement your own event evaluation logic ThresholdFilter Threshold filter , Filter out logs below the specified threshold . When the log level is equal to or higher than the threshold , Filter return NEUTRAL; When the log level is below the threshold , Logs will be rejected ThresholdFilter Filter events below the specified threshold . For events equal to or above the threshold ,ThresholdFilter Will call its decision() Method response NEUTRAL But events with a level below the threshold will be rejected
边栏推荐
- It's enough for MySQL to have this article (disgusting and crazy typing 37k words, just for Bo Jun's praise!!!)
- Gin template
- 亚马逊云助手小程序来啦!
- Vue router route cache
- 利用C语言巧妙实现棋类游戏——三子棋
- 【Unity实战100例】Unity万能答题系统之单选多选判断题全部通用
- Life cycle hooks in routing - activated and deactivated
- QT basic day 2 (2) QT basic components: button class, layout class, output class, input class, container and other individual examples
- Remote invocation of microservices
- Latest 10 billion quantitative private placement list
猜你喜欢

JS 鸡生蛋与蛋生鸡问题,Object与Function究竟谁出现的更早?Function算不算Function的实例?

Variables and encryption in ansible

Remote invocation of microservices

QT基础第二天(2)qt基础部件:按钮类,布局类,输出类,输入类,容器等个别举例

Latest 10 billion quantitative private placement list

Full process flow of CMOS chip manufacturing

Operator3 - design an operator

A long article --- in-depth understanding of synchronized

第7节-程序的编译(预处理操作)+链接

WPF interface layout must know basis
随机推荐
Homebrew brew update doesn't respond for a long time (or stuck in updating homebrew...)
NPM install reports an error NPM err could not resolve dependency NPM err peer
Comparison of advantages between can & canfd integrated test analysis software lkmaster and PCA Explorer 6 analysis software
利用C语言巧妙实现棋类游戏——三子棋
暑期总结(二)
js第四天流程控制(if语句和switch语句)
Ansible中的变量及加密
QT基础第二天(2)qt基础部件:按钮类,布局类,输出类,输入类,容器等个别举例
Variables and encryption in ansible
Unity发送Post请求给GoLang服务端解析并返回
我,28岁,测试员,10月无情被辞:想给还在学测试 的人提个醒......
A long article --- in-depth understanding of synchronized
后缀自动机(SAM)讲解 + Luogu p3804【模板】后缀自动机 (SAM)
JS 鸡生蛋与蛋生鸡问题,Object与Function究竟谁出现的更早?Function算不算Function的实例?
MySQL - multi table query
WPF interface layout must know basis
20-40k | mecarmand 3D vision algorithm / software / Product Manager Recruitment
Win11vmware turns on the virtual machine and restarts on the blue screen and the solution that cannot be started
WPF nested layout case
CMOS芯片制造全工艺流程