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.

Q 3 - Which of the following level designates error events that might still allow the application to continue running?

A - DEBUG

B - ERROR

C - FATAL

D - INFO

Answer : B

Explanation

ERROR − Designates error events that might still allow the application to continue running.

Q 4 - Which of the following level is intended to turn off logging?

A - OFF

B - TRACE

C - WARN

D - ALL

Answer : A

Explanation

OFF − The highest possible rank and is intended to turn off logging.

Answer : B

Explanation

L − Used to output the line number from where the logging request was issued.

Answer : B

Explanation

bufferedIO − This flag indicates whether we need buffered writing enabled. By default, it is set to false.

Q 8 - Which of the following DatePattern configuration of DailyRollingFileAppender rolls over the logs at the end of each month and at the beginning of the next month?

A - '.' yyyy-MM

B - '.' yyyy-MM-dd

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

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

Answer : A

Explanation

'.' yyyy-MM − Roll over at the end of each month and at the beginning of the next month.

Answer : A

Explanation

The log4j API provides the org.apache.log4j.jdbc.JDBCAppender object, which can put logging information in a specified database.

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