热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

Log4j 面试题与答案

问题 16. What is the purpose of the OFF log level?

The OFF log level is the highest possible rank and is intended to turn off logging.

这有帮助吗? 添加评论 查看评论
 

问题 17. What is the purpose of the TRACE log level?

The TRACE log level designates finer-grained informational events than the DEBUG.

这有帮助吗? 添加评论 查看评论
 

问题 18. What is the purpose of the WARN log level?

The WARN log level designates potentially harmful situations.

这有帮助吗? 添加评论 查看评论
 

问题 19. How do Log Levels work or tell the log level hierarchy?

A log request of level p in a logger with level q is enabled if p >= q. This rule is at the heart of log4j. It assumes that levels are ordered. For the standard levels, we have ALL < DEBUG < INFO < WARN < ERROR < FATAL < OFF.

For example: if the log level is mentioned as 'WARN' in the log4j properties. Then the logs will be coming in the log file are: WARN, ERROR, FATAL

这有帮助吗? 添加评论 查看评论
 

问题 20. What are different appenders that can configure in log4j?

There are different appenders that we can configure in log4j are: CONSOLE, FILES, DATABASE, JMS, EVENT LOGGING.

Mainly used appenders:

CONSOLE in log4j:- If we use this as appenders in your application, log4j logs the information in the console or command prompt window that is started with startup script.
Files in log4j:- Files Appender is used to log the information into our custom name files. when we are configuring this appender, we can specify the file name.

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。