+91 90691 39140 | +1 253 214 3115 | info@hub4tech.com | hub4tech

Log4j Interview Questions and Answers

11
Explain what is layouts in log4j?

Layout in log4j is responsible for formatting logging information in different styles.

12
Mention what is the best way to migrate from java.util logging to log4j?

The best way to migrate from java.util logged to log4j is to use global file search/replace method. It will replace with “org.apache.log4j.Logger”

13
Mention what are the two static methods for obtaining a logger object?

The two static methods for obtaining a logger object are

  • Public static Logger getRootLogger()
  • Public static Logger getLogger(String name)
14
Explain what are the format characters used in log4j?

The format characters used in log4j are

  • L- it is used to output the line number from where the logging request was processed or issued
  • m- It is used to output the application supplied message related with the logging event
  • p-It is used to output the priority of the logging event
  • C- It is used to output the class name of the caller issuing the logging request
15
Mention what are the other support objects in Log4j?

There are other support objects in Log4j framework they are

  • Level Object
  • Filter Object
  • Object Renderer
  • Log Manager
Copyright ©2015 Hub4Tech.com, All Rights Reserved. Hub4Tech™ is registered trademark of Hub4tech Portal Services Pvt. Ltd.
All trademarks and logos appearing on this website are the property of their respective owners.
FOLLOW US