1

There are number of method to create logger instance.

  1. one instance of Logger per class
  2. one instance of Logger per thread
  3. one instance of Logger per application

Can any one suggest performance on each method?

Currently i am using one logger object per application so Is this down multithreaded application performance?.

Kamlesh Kanazariya
  • 1,209
  • 2
  • 15
  • 32
  • possible duplicate of [Log4J: Strategies for creating Logger instances](http://stackoverflow.com/questions/1770076/log4j-strategies-for-creating-logger-instances) – Akash Yadav Sep 17 '15 at 07:24
  • @AkashYadav Thanks , I have read that question and answer but can't able to analyze performance hit on each method. My view point if i make Logger per application then it down application performance. – Kamlesh Kanazariya Sep 17 '15 at 07:28

1 Answers1

1

A good tracking resource is Jamon, I guess you know it. Inside an EE application there is a simple way to "hook" it to every method call, in order to trace all method's execution time. In this way, you could analyze the impact of your "added" log calls

Back to your question, I don't think there should be performance issues, as the log output is anyway serialized and instantiating per method, classs or even application is just a matter of used memory

Shine
  • 3,788
  • 1
  • 36
  • 59