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 : A

Explanation

filter − The Filter objects can analyze logging information beyond level matching and decide whether logging requests should be handled by a particular Appender or ignored.

Q 4 - Which of the following level designates informational messages that highlight the progress of the application at coarse-grained level?

A - DEBUG

B - ERROR

C - FATAL

D - INFO

Answer : D

Explanation

INFO − Designates informational messages that highlight the progress of the application at coarse-grained level.

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 : A

Explanation

immediateFlush − This flag is by default set to true, which means the output stream to the file being flushed with each append operation.

Answer : A

Explanation

maxFileSize − This is the critical size of the file above which the file will be rolled.

Answer : C

Explanation

sql − Specifies the SQL statement to be executed every time a logging event occurs. This could be INSERT, UPDATE, or DELETE.

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