Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Choosing the right logger  RSS feed

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want a good logger utility for my application.My application is multi threaded and the logger should not become a bottleneck in the application. I have log4j on one hand, but there is always the temptation to write my own logger class. My priorities are clear- easy debugging in a threaded mess and also good performance. Please help.
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Log4J is thread-safe and fast. I really don't think a roll-your-own logging facility would improve upon Log4J. In fact, I think you'll be hard-pressed to even match Log4J in terms of performance and flexibility.
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any particular reason why log4j isn't sufficient for your needs?
 
Uttam Kini
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no reason that I have not to choose log4j......In fact It is my first choice.... Just wanted to confirm my choice .... Thanks I will go for log4j
 
Author
Ranch Hand
Posts: 3418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the Log4J with slf4J (facade).
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!