Bug 145694 - Java Logger returned from Logger.getLogger("global") does not log INFO messages
Summary: Java Logger returned from Logger.getLogger("global") does not log INFO messages
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc34   
(Show other bugs)
Version: 3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom Tromey
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-20 17:55 UTC by Steve Peters
Modified: 2014-08-11 05:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-28 02:43:44 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Steve Peters 2005-01-20 17:55:51 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:
There appear to be differences in the logging capabilites global
logger between gcj and the Sun Java SDK.  In the gcj, the logger will
not log Level.INFO messages to the console while the Sun JDK will. 
See the actual and expected results below to see the differences. 
Below are the java version used.  Along with the base Fedora versions
of the gcj, I also have installed the following rpms.

ecj-2.1.3-5.i386.rpm
java-1.4.2-gcj-compat-1.4.2.0-11jpp.noarch.rpm
java-1.4.2-gcj-compat-devel-1.4.2.0-11jpp.noarch.rpm
katana-2.0.0-1.noarch.rpm




Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.  Save and compile the following Java code

import java.util.logging.*;

public class Hello {

    public static void main(String[] args) {
        Logger log = Logger.getLogger("global");
        //log.setUseParentHandlers(false);
        log.setLevel(Level.ALL);
        //Handler h = new ConsoleHandler();
        //h.setFormatter(new XMLFormatter());
        //log.addHandler(h);
        Level l = log.getLevel();
        System.out.println(l + ":  " + l.intValue());
        System.out.println(Level.SEVERE +
            ":  " + Level.SEVERE.intValue());
        System.out.println(Level.INFO +
            ":  " + Level.INFO.intValue());
        log.info("Hello");
        log.log(Level.INFO, "Hello");
    }
}

2.  Run the java class with java

    

Actual Results:  It prints out the following:

ALL:  -2147483648
SEVERE:  1000
INFO:  800


Expected Results:  Running against a 1.4.2 Sun JDK produces:

ALL:  -2147483648
SEVERE:  1000
INFO:  800
Jan 20, 2005 11:45:03 AM HelloLog main
INFO: Hello
Jan 20, 2005 11:45:03 AM HelloLog main
INFO: Hello

Additional info:

[steve@kirk sandbox]$ javac -version
Eclipse Java Compiler 0.319_R21x, Copyright IBM Corp 2000-2003. All
rights reserved.

[steve@kirk sandbox]$ java -version
java version "1.4.2"
jdkgcj 0.3.1 (http://www.arklinux.org/projects/jdkgcj)
gcj (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

Comment 1 Tom Tromey 2005-09-28 02:43:44 UTC
Fixed upstream at some point; definitely works with the
gcj included in FC4.



Note You need to log in before you can comment on or make changes to this bug.