logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48027] New: Logger statements in a particular class file is not printed always
Date Tue, 20 Oct 2009 10:53:01 GMT

           Summary: Logger statements in a particular class file is not
                    printed always
           Product: Log4j
           Version: 1.2
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Other
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: isaac.anoop@gmail.com


My application has run 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.

Here is the structure of the two classes which has reported the issue. I have a
class A and another class B which has extended the class A. I am printing 2 log
statements in class B(one statement using the logger object of class A (logA
object), and the other statement with the logger object of class B (logB
object)). But the logger statement using the logA object does not get printed
on some days. After a server restart, it starts working fine. Is there some
thread which gets killed?

public class A{
   protected static Logger logA = Logger.getLogger(A.class);

   public static void myLog(String s) {
        logA.info("in myLog, " + s);


public class B extends A{

protected static Logger logB = Logger.getLogger(B.class);
myLog("Log Statement Number 1"); //This statement does not get printed all the
logB.info("Log Statment Number 2"); //This statement always get printed

This is not just a problem with the non-functioning log statements, but the
entire code in this particular class seems to be working wrong due to this
issue. This is hampering the functionality of my application. Any help is


Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message