debug log problem in java programing

Discussions

EJB programming & troubleshooting: debug log problem in java programing

  1. debug log problem in java programing (2 messages)

    debug log problem in java programing
    old way1:
         System.out.println("LogonAction: User '" + username +
                          "' logged on in session " + sessionId);
    *****************************************
    old way2:
    in java soruce file:
           if (log.isDebugEnabled()) {
                log.debug("LogonAction: User '" + username +
                          "' logged on in session " + sessionId);
            }
    *****************************************
    log4j: http://logging.apache.org/log4j/
    in java source file:
         logger.info("LogonAction: User '" + username +
                          "' logged on in session " + sessionId);
    *****************************************
    JTracker: http://www.jtracker.net
    in java source file:
        /*<<<TPID=TP001>>>*/
    in jtracker case file:
       BPoint(TP=TP001){
        var.dis(username,sessionID);
        }
    ...
    which solution does everyone seleted?
  2. debug log problem in java programing[ Go to top ]

    I usually use Log4j. You should pick the one that best suits your case.
  3. Personally I always use Log4J. I have been thinking that perhaps I should use the commons-logging interface which enables me to transparently use Log4J or the logging mechanism in J2SEE 1.4, but I have never had any use for it.