Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

log statements in one particular class do not get printed at times.

843789May 4 2010 — edited May 20 2010
Hello,

My application has got into an issue where some log statements in "one particular class" do not get printed at times.
The issue is not reproduced in a consistent manner ie. it may happen on some days/may not on some other days.

On analysing this i could find one difference in this class from others, ie the logger object is not static.

The problem class is using the logger object creation as follows,

private Logger logger = Logger.getLogger(this.getClass().getName());


And all other classes are using,

private static Logger logger = Logger.getLogger(this.getClass().getName());


Whether this could create a problem like this ?

Thanks in advance :)

Suneesh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2010
Added on May 4 2010
5 comments
752 views