log4j Mock Test


Advertisements


This section presents you various set of Mock Tests related to log4j Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

log4j Mock Test I

Q 2 - Which of the following log4j objects are responsible for capturing logging information?

A - loggers

B - appenders

C - layouts

D - None of the above.

Answer : A

Explanation

loggers − Responsible for capturing logging information.

Q 3 - Which of the following log4j objects are responsible for publishing logging information to various preferred destinations?

A - loggers

B - appenders

C - layouts

D - None of the above.

Answer : B

Explanation

appenders − Responsible for publishing logging information to various preferred destinations.

Q 4 - Which of the following log4j objects are responsible for formatting logging information in different styles?

A - loggers

B - appenders

C - layouts

D - None of the above.

Answer : C

Explanation

layouts − Responsible for formatting logging information in different styles.

Answer : D

Explanation

All of the above options are correct.

Answer : D

Explanation

All of the above options are correct.

Answer : D

Explanation

All of the above options are correct.

Answer : D

Explanation

threshold − Appender can have a threshold level associated with it independent of the logger level. The Appender ignores any logging messages that have a level lower than the threshold level.

Answer : A

Explanation

filter − The Filter objects can analyze logging information beyond level matching and decide whether logging requests should be handled by a particular Appender or ignored.

Answer : A

Explanation

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

Answer : B

Explanation

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

Answer : C

Explanation

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

Answer Sheet

Question Number Answer Key
1 D
2 A
3 B
4 C
5 D
6 D
7 D
8 D
9 D
10 C
11 D
12 C
13 C
14 C
15 C
16 C
17 C
18 A
19 B
20 C
21 D
22 A
23 A
24 B
25 C

log4j_questions_answers.htm

Advertisements
E-Books Store