当前位置:网站首页>Log4j有哪几种日志级别呢?
Log4j有哪几种日志级别呢?
2022-07-30 10:29:00 【qq_25073223】
转自:
下文笔者讲述Log4j中的日志级别,如下所示:
Log4j的日志级别
Log4j中有以下几种日志级别登记
All:最低等级的,用于获取所有日志记录
Trace:是追踪,就是程序推进以下,你就可以写个trace输出
所以trace应该会特别多,不过没关系,我们可以设置最低日志级别不让他输出
Debug:指出细粒度信息事件对调试应用程序是非常有帮助的
Info:消息在粗粒度级别上突出强调应用程序的运行过程
Warn:输出警告及warn以下级别的日志
Error:输出错误信息日志
Fatal:输出每个严重的错误事件将会导致应用程序的退出的日志
OFF:最高等级的,用于关闭所有日志记录
日志级别等级说明
按照从低到高为:All < Trace < Debug < Info < Warn < Error < Fatal < OFF
日志注意事项
当将log level设置在某一个级别上
则比此级别优先级高的log都能打印出来
如:如果设置优先级为WARN
那么OFF、FATAL、ERROR、WARN 4个级别的log能正常输出,而INFO、DEBUG、TRACE、 ALL级别的log则会被忽略
-------------------------------------------------------------------------------------------------------------
Log4j建议只使用四个级别,优先级从高到低分别是ERROR、WARN、INFO、DEBUG
-------------------------------------------------------------------------------------------------------------
log4j默认的优先级为ERROR或WARN(实际上是ERROR)边栏推荐
- Multithreading--the usage of threads and thread pools
- Database dirty reads, non-repeatable reads, phantom reads and corresponding isolation levels
- JCL learning
- Understanding of deadlock
- MySQL |子查询
- OC-关于alloc和dealloc(还没开始写)
- 通过构建一个顺序表——教你计算时间复杂度和空间复杂度(含递归)
- 易基因:人类tRNA基因位点表现出与衰老相关的DNA高甲基化|研究文章
- The thread pool method opens the thread -- the difference between submit() and execute()
- Js array operating mobile for encapsulation
猜你喜欢

If someone asks you about distributed transactions again, throw this to him

Paper reading: SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers

idea2021+Activiti【最完整笔记一(基础使用)】

STM32CubeMX configuration to generate FreeRTOS project

梅科尔工作室-看鸿蒙设备开发实战笔记四——内核开发

论文阅读:SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers

Alibaba Cloud OSS Object Storage

类和对象—6个默认成员函数

Meikle Studio-Look at the actual combat notes of Hongmeng device development six-wireless networking development

Detailed explanation of JVM memory layout, class loading mechanism and garbage collection mechanism
随机推荐
Meikle Studio-Look at Hongmeng Device Development Practical Notes 7-Network Application Development
jmeter接口压力测试-(二)
MySQL | Subqueries
【AGC】增长服务2-应用内消息示例
MFCC转音频,效果不要太逗>V<!
Re19: Read the paper Paragraph-level Rationale Extraction through Regularization: A case study on European Court
New in GNOME: Warn users when Secure Boot is disabled
WebAPI 复习
线上靶机prompt.ml
Linux内核设计与实现(十)| 页高速缓存和页回写
Adaptive Control - Simulation Experiment 1 Designing Adaptive Laws Using Lyapunov's Stability Theory
In 2022, the top will be accepted cca shut the list
[Qualcomm][Network] 网络拨号失败和netmgrd服务分析
Alibaba Cloud OSS Object Storage
多线程保证单个线程开启事务并生效的方案
第3章 信息收集
【HMS core】【FAQ】HMS Toolkit Typical Questions Collection 1
Mysterious APT Attack
SST-Calib:结合语义和VO进行时空同步校准的lidar-visual外参标定方法(ITSC 2022)
2022年顶会accepted papers list