Monday, July 22, 2019

Log4j Logger

Q- What is the log level in production environment?
Answer:- Error

Q- Is logger thread safe?
Yes.

Q- What are different logging level in Java?
DEBUG
INFO
WARN
ERROR
TRACE
FATAL
OFF

Q- How logging in Java affects performance?
Uses either WARN ERROR or FINER, FINEST java logging level in production environment. Never use DEBUG level logging in java in production.

Q- Different types of Appenders in Log4j?
Q-Explain layouts in log4j?

Q-How does log Levels work in Log4J?
A log request of level n in a logger with level m is enabled if m >= n.
For the standard levels, we have ALL < DEBUG < INFO < WARN < ERROR < FATAL < OFF.

Q-Explain few format characters used in log4j.
Q-How can you log into the database using Log4j?
Q-Explain immediateFlush property of FileAppender.

No comments:

Post a Comment