log4j Online Quiz


Advertisements


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

Explanation

public void error(Object message) of Logger class prints messages with the level Level.ERROR.

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

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

Explanation

URL − Sets the JDBC URL.

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

A - true

B - false

Answer : A

Explanation

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


log4j_questions_answers.htm

Advertisements