Home Interview Questions and Answers Log4j Interview Questions and Answers For Graduates Part-5

log4j41.What is the purpose of d character used in the conversionPattern of PatternLayout object?
d − Used to output the date of the logging event. For example, %d{HH:mm:ss,SSS} or %d{dd MMM yyyy HH:mm:ss,SSS}.

42.What is the purpose of F character used in the conversionPattern of PatternLayout object?
F − Used to output the file name where the logging request was issued.

43.What is the purpose of l character used in the conversionPattern of PatternLayout object?
l − Used to output location information of the caller which generated the logging event.

44.What is the purpose of L character used in the conversionPattern of PatternLayout object?
L − Used to output the line number from where the logging request was issued.

45.What is the purpose of m character used in the conversionPattern of PatternLayout object?
m − Used to output the application supplied message associated with the logging event.

46.What is the purpose of M character used in the conversionPattern of PatternLayout object?
M − Used to output the method name where the logging request was issued.

47.What is the purpose of n character used in the conversionPattern of PatternLayout object?
n − Outputs the platform dependent line separator character or characters.

48.What is the purpose of p character used in the conversionPattern of PatternLayout object?
p − Used to output the priority of the logging event.

49.What is the purpose of r character used in the conversionPattern of PatternLayout object?
r − Used to output the number of milliseconds elapsed from the construction of the layout until the creation of the logging event.

50.What is the purpose of t character used in the conversionPattern of PatternLayout object?
t − Used to output the name of the thread that generated the logging event.

 

You may also like

Leave a Comment