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

Explanation

All of the above options are correct.

Answer : D

Explanation

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

Q 4 - Which of the following level designates all levels including custom levels?

A - OFF

B - TRACE

C - WARN

D - ALL

Answer : D

Explanation

ALL − All levels including custom levels.

Answer : A

Explanation

l − Used to output location information of the caller which generated the logging event.

Answer : B

Explanation

encoding − It is possible to use any character-encoding. By default, it is the platform-specific encoding scheme.

Answer : C

Explanation

DatePattern − This indicates when to roll over the file and the naming convention to be followed. By default, roll over is performed at midnight each day.

Q 9 - Is log4j thread safe?

A - true

B - false

Answer : A

Explanation

true − log4j is thread-safe.

Q 10 - Logger uses the Layout objects and the conversion pattern associated with them to format the logging information.

A - true

B - false

Answer : B

Explanation

false − Appender uses the Layout objects and the conversion pattern associated with them to format the logging information.


log4j_questions_answers.htm

Advertisements