Log4j(Engineering > Computer Science And Engineering ) Questions and Answers
Question 1. Which of the following method of logger print a log message in info mode?
public void debug(Object message)
public void error(Object message)
public void fatal(Object message)
public void info(Object message)
Explanation:-
Answer: Option D. -> public void info(Object message)
Question 2. Which of the following genres does Log4j produce?
Gospel music
Avant-rock
Logging Tool
Action game
Explanation:-
Answer: Option C. -> Logging Tool
Question 3. Mention what are the three principal components of Log4j?
Loggers
Appenders
Layout
All of these
Explanation:-
Answer: Option D. -> All of these
Question 4. Who developed Log4j?
Mozilla Foundation
Apache Software Foundation
Sony Creative Software
Blender Foundation
Explanation:-
Answer: Option B. -> Apache Software Foundation
Question 5. Mention what are the different types of Appenders?
ConsoleAppender logs to standard output
FileAppender prints logs to some file
Rolling file appender to a file with maximum size
All of these
Explanation:-
Answer: Option D. -> All of these
Question 6. Mention what are the other support objects in Log4j?
Level Object
Filter Object
Object Renderer
All of these
Explanation:-
Answer: Option D. -> All of these
Question 7. Inside logger component what are the different log levels?
All
Debug
Info
None
Explanation:-
Answer: Option A. -> All
Question 8. The Appender object is responsible for publishing logging information to various preferred destinations such as a database, file, console, UNIX Syslog, etc.
false
true
Both of these
None
Explanation:-
Answer: Option B. -> true
Question 9. Which of the following platforms does Log4j run on?
Debian
Windows Server 2008
Cross-platform
Normal-platform
Explanation:-
Answer: Option C. -> Cross-platform
Question 10. What are the format characters used in log4j?
L- it is used to output the line number from where the logging request was processed or issued
m- It is used to output the application supplied message related to the logging event
P- It is used to output the priority of the logging event