Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adv & DisAdvantage of using Log4j

 
Rajp al Singh
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody expalain me the advantage & disadvantage of using log4j ?

Is there any disadvantage, if i kept the logging level at INFO & my application is printing large logs on each page response ? Will there be any delay in response time of each page ?

Guys, i need this info., Can anybody help me ?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello "Rajp Sing"

Welcome to JavaRanch

We are glad to have you here. We have a naming policy at JavaRanch. Your displayed name must consist of a first name (or an initial), a space, and a family name (in that order) and not be obviously fictitious. Please take a moment to change it, which you can do right here.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As for your question,

Is there any disadvantage, if i kept the logging level at INFO & my application is printing large logs on each page response ? Will there be any delay in response time of each page ?


Depends on how many log messages you are printing. Going by what you say, it looks like the messages are very verbose, in which case you should have logged them at DEBUG level. Applications in production, usually configure the log level to be INFO or higher. This reduces the amount of log messages and also to some extent (depending on how much you log) increases the performance of the application.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic