log4j Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to log4j Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 3 - Which of the following level designates error events that might still allow the application to continue running?

A - DEBUG

B - ERROR

C - FATAL

D - INFO

Answer : B

Explanation

ERROR − Designates error events that might still allow the application to continue running.

Q 4 - Which of the following level designates potentially harmful situations?

A - OFF

B - TRACE

C - WARN

D - ALL

Answer : C

Explanation

WARN − Designates potentially harmful situations.

Answer : D

Explanation

F − Used to output the file name where the logging request was issued.

Answer : A

Explanation

x − Used to output the NDC (nested diagnostic context) associated with the thread that generated the logging event.

Answer : C

Explanation

HTMLLayout.setTitle(String) − Sets the title for the HTML file. Default is log4j Log Messages.

Q 8 - Which of the following DatePattern configuration of DailyRollingFileAppender rolls over the logs at midnight each day?

A - '.' yyyy-MM

B - '.' yyyy-MM-dd

C - '.' yyyy-MM-dd-a

D - '.' yyyy-MM-dd-HH

Answer : B

Explanation

'.' yyyy-MM-dd − Roll over at midnight each day. This is the default value.

Answer : B

Explanation

password − Sets the database password.

Q 10 - Appender can have a threshold level associated with it independent of the logger level.

A - true

B - false

Answer : A

Explanation

true − Appender can have a threshold level associated with it independent of the logger level. The Appender ignores any logging messages that have a level lower than the threshold level.

log4j_questions_answers.htm
Advertisements