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 : 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 very severe error events that will presumably lead the application to abort?

A - DEBUG

B - ERROR

C - FATAL

D - INFO

Answer : C

Explanation

FATAL − Designates very severe error events that will presumably lead the application to abort.

Answer : B

Explanation

%-20c − Right pad with spaces if the category name is less than 20 characters long.

Answer : B

Explanation

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

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.

Q 9 - The top-level layer of log4j architecture is the Logger which provides the Logger object.

A - true

B - false

Answer : A

Explanation

true − The top-level layer of log4j architecture is the Logger which provides the Logger object. The Logger object is responsible for capturing logging information and they are stored in a namespace hierarchy.

Q 10 - The target may be a console, a file, or another item depending on the appender.

A - true

B - false

Answer : A

Explanation

true − The target may be a console, a file, or another item depending on the appender.


log4j_questions_answers.htm

Advertisements