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

Explanation

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

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

Explanation

bufferSize − If buffered I/O is enabled, it indicates the buffer size. By default, it is set to 8kb.

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

driver − Sets the driver class to the specified string. If no driver class is specified, it defaults to sun.jdbc.odbc.JdbcOdbcDriver.

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

A - false

B - true

Answer : B

Explanation

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

log4j_questions_answers.htm
Advertisements