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 informational messages that highlight the progress of the application at coarse-grained level?

A - DEBUG

B - ERROR

C - FATAL

D - INFO

Answer : D

Explanation

INFO − Designates informational messages that highlight the progress of the application at coarse-grained level.

Answer : C

Explanation

m − Used to output the application supplied message associated with the logging event.

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

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

Q 10 - By default, the LogManager looks for a file named log4j.properties in the CLASSPATH.

A - false

B - true

Answer : B

Explanation

true − By default, the LogManager looks for a file named log4j.properties in the CLASSPATH.


log4j_questions_answers.htm

Advertisements