Community
Participate
Working Groups
Build Identifier: Build id: M20110210-1200 It seems that including a logger object, results in multiple lines (in my case 6 lines) being returned, for example: ... _log.debug("Cards held by dealer:"); ... results in 0 [main] DEBUG poker.Poker - Cards held by dealer: 0 [main] DEBUG poker.Poker - Cards held by dealer: 0 [main] DEBUG poker.Poker - Cards held by dealer: 0 [main] DEBUG poker.Poker - Cards held by dealer: 0 [main] DEBUG poker.Poker - Cards held by dealer: 0 [main] DEBUG poker.Poker - Cards held by dealer: being displayed within the Console window. whilst coding 'System.out.println("Cards held by dealer:");', results in: 'Cards held by dealer:' being displayed within the console window. Reproducible: Always
Created attachment 193967 [details] Source code (dummy) It seems that bug #331160 reported a similar issue, however it is assigned to a dummy inbox.
Does the multiple logging also occur when you launch the example on the command line?
(In reply to comment #2) > Does the multiple logging also occur when you launch the example on the command > line? Well, somehow I'm getting a bunch of compilation errors when trying to compile through the command line, so it appears I have some debugging to do, however, I can't really understand why it seemed to be working within eclipse on 24.04.2011, and, I haven't changed much about Eclipse, although the source code has changed in the meantime. However I tried running the command line on the source code originally attached. @echo off set CLASSPATH=. javac *.java java -Dlog4j.debug=true Poker pause Player.java:3: package org.apache.log4j does not exist import org.apache.log4j.BasicConfigurator; ^ Poker.java:12: package org.apache.log4j does not exist import org.apache.log4j.BasicConfigurator; ^ Poker.java:13: package org.apache.log4j does not exist import org.apache.log4j.Logger; ^ Poker.java:118: cannot find symbol symbol : class Logger location: class poker.Poker private static final Logger _log = Logger.getLogger(Poker.class); ^ Player.java:27: cannot find symbol symbol : variable BasicConfigurator location: class poker.Player BasicConfigurator.configure(); ^ Poker.java:24: cannot find symbol symbol : variable BasicConfigurator location: class poker.Poker BasicConfigurator.configure(); ^ Poker.java:118: cannot find symbol symbol : variable Logger location: class poker.Poker private static final Logger _log = Logger.getLogger(Poker.class); ^ 7 errors Exception in thread "main" java.lang.NoClassDefFoundError: Poker Caused by: java.lang.ClassNotFoundException: Poker at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) Could not find the main class: Poker. Program will exit. Press any key to continue . . .
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.