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

Answer : D

Explanation

All of the above options are correct.

Answer : D

Explanation

threshold − 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.

Q 4 - Which of the following level designates finer-grained informational events than the DEBUG?

A - OFF

B - TRACE

C - WARN

D - ALL

Answer : B

Explanation

TRACE − Designates finer-grained informational events than the DEBUG.

Answer : B

Explanation

X − The X conversion character is followed by the key for the MDC. For example, X{clientIP} will print the information stored in the MDC against the key clientIP.

Answer : C

Explanation

bufferSize − If buffered I/O is enabled, it indicates the buffer size. By default, it is set to 8kb.

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

A - '.' yyyy-MM

B - '.' yyyy-MM-dd

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

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

Answer : C

Explanation

'.' yyyy-MM-dd-a − Roll over at midday and midnight of each day.

Answer : B

Explanation

user − Sets the database user name.

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