A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
Java in General
Joined: Jun 22, 2010
Jan 11, 2012 04:47:48
I am using log4j to my project for logging datas.
the following code is used to create Logger instance.
private static Logger log = Logger.getLogger(Sample.class);
My question is why should we declare Logger as static?
thakns in advance.
Joined: Dec 28, 2007
Jan 11, 2012 05:57:26
Let's continue this discussion
Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD -
Daileon: A Tool for Enabling Domain Annotations
I agree. Here's the link:
Struts 1 and Log4J
Logging info on server side
log4J and java.util.logging
How to encapsulate Logger info
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014