当前位置:网站首页>Log4j additivity属性简介说明
Log4j additivity属性简介说明
2022-07-30 10:29:00 【qq_25073223】
下文笔者将讲述Log4j中的additivity属性的相关简介说明,如下所示:
Log4j中additivity属性的功能说明
Log4j中additivity的值为 true或false
additivity的值的功能为:
设置子Logger 是否继承父Logger的输出源(appender)的标志位
当additivity设为false,则子Logger只会在自己的appender里输出,而不会在父Logger的appender里输出
例
设置com.java265包及其子包下的Logger只在本Appender中输出
//log4j.properties log4j.additivity.com.test=false //log4j.xml <logger name="com.java265" additivity="false"> <level value="INFO" /> <appender-ref ref="logfile" /> </logger>
additivity注意事项:
loj4j默认情况下additivity为true
某个logger的additivity设置为false
指log只打印到本log的appender中,而不再打印到其父logger的appender边栏推荐
- [HarmonyOS] [ARK UI] How to double-click the return key to exit in HarmonyOS ets language
- 梅科尔工作室-看鸿蒙设备开发实战笔记四——内核开发
- Scrapy爬虫之网站图片爬取
- [AGC] Growth Service 2 - In-App Message Example
- spark udf 接受并处理 null值.
- ESP32CAM 1838接收红外遥控器信号
- Array of Shell System Learning
- Re19: Read the paper Paragraph-level Rationale Extraction through Regularization: A case study on European Court
- Neural Network Study Notes 4 - Autoencoder (including sparse, stacked) (updated)
- RandLA-Net复现记录
猜你喜欢

线程池方式开启线程--submit()和execute()的区别

JVM内存布局、类加载机制及垃圾回收机制详解

SST-Calib:结合语义和VO进行时空同步校准的lidar-visual外参标定方法(ITSC 2022)

你真的懂Redis的5种基本数据结构吗?

电压跟随器不要随便加

JCL 学习

async.js入门

(C language) file operation

Meikle Studio-Look at Hongmeng Device Development Practical Notes 7-Network Application Development

ospf2 two-point two-way republish (question 2)
随机推荐
kubernetes的一些命令
idea2021+Activiti [the most complete note one (basic use)]
Basemap and Seaborn
In 2022, the top will be accepted cca shut the list
【 HMS core 】 【 Analytics Kit] [FAQ] how to solve the payment amount in huawei pay analysis shows zero problem?
神经网络学习笔记4——自动编码器(含稀疏,堆叠)(更新中)
Meikle Studio-Look at the actual combat notes of Hongmeng device development six-wireless networking development
360发布面向未来的EDR,全方位守护政企用户终端安全
梅科尔工作室-看鸿蒙设备开发实战笔记七——网络应用开发
GNOME 新功能:安全启动被禁用时警告用户
Easy gene: human tRNA gene loci showed age-related high DNA methylation | research articles
Container Technology - A Simple Understanding of Kubernetes Objects
神经网络学习笔记3——LSTM长短期记忆网络
多线程保证单个线程开启事务并生效的方案
安全提示:Qt中的FreeType
拖放事件,dataTransfer,getBoundingClientRect
自适应控制——仿真实验一 用李雅普诺夫稳定性理论设计自适应规律
系统设计精选 | 基于FPGA的CAN总线控制器的设计(附代码)
Re21: Read the paper MSJudge Legal Judgment Prediction with Multi-Stage Case Representation Learning in the Real
【HMS core】【FAQ】HMS Toolkit典型问题合集1