Kamlesh Kanazariya
Kamlesh Kanazariya

Reputation: 1259

Performance by using one logger object per application in Java

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?.

Upvotes: 1

Views: 367

Answers (1)

Shine
Shine

Reputation: 3818

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

Upvotes: 1

Related Questions