troubleshooting Question

Defining Logger as static and non-static variable

Avatar of Software Programmer
Software Programmer asked on
Java
8 Comments2 Solutions138 ViewsLast Modified:
Hi,

Sometimes in project i see a static variable defined for logger

private final static Logger LOGGER = Logger.getLogger(Something.class);

in some cases i saw static is not being used and defined as

private final Logger LOGGER = Logger.getLogger(Something.class);

what is the difference between the two? Does it makes any difference in cluster and in non-cluster environment?

Thanks.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros