Thanks for the suggestions, Dan. When I ran the NetBeans-generated ant script from the command line (which generally works fine - that's a nice feature of NetBeans, if you ask me), I got no logging output. When I ran a plain "Hello.java" type program from the command line, log output was fine. So, obviously something about NetBeans runtime setup.
I'm not sure whether this is a NetBeans bug or a feature. For posterity... - Java VM options are configured in the Project Properties dialog (right-click on the project, select Properties, go to "Run" panel). - In that dialog, you can add a VM property like "-Djava.util.logging.config.file=logging.properties". The surrogate container project has just such an entry so as to use a local logging properties file for debugging purposes. - The same runtime options appear to be applied to the JUnit test runner, inside or outside the NetBeans IDE. - The path to "logging.properties" is interpreted relative to the "working directory" also set in the "Run" panel of the project properties. - In the original project on a Win7 machine, I had set the working directory to "build/testroot", which is a directory relative to the Netbeans project directory. - Project was transferred not by copying to the Mac, but by checking out the project from the asf - The "working directory" setting appears to be in some file that isn't checked in to version control, because when I checked out the project, it appears to _not_ have the "working directory" set. - Setting the working directory clears the problem and returns normal logging output. - I surmise that if the file called out by "-Djava.util.logging.config.file=..." can't be found, the logging system defaults to silence, since there are no output handlers setup. Should the working directory setting be part of a version-controlled file? I would have said yes, since it can be set relative to the project directory. But I could see the argument that it's a runtime thing that might not be portable across OS's. I don't know whether it's left out intentionally or it's just an oversight. In any case, problem solved. Thanks, all! Greg On Fri, 2013-01-11 at 17:31, Dan Creswell wrote: > You tried any other IDE? Or running junit from command-line? > > Sent from my iPad > > On 11 Jan 2013, at 21:54, Greg Trasuk <[email protected]> wrote: > > > > > I recently switched to a MacBook and I'm having an odd situation running > > NetBeans 7.2.1 under Mac OS X 10.8 (latest) and the Oracle JVM (v 7 I > > believe). > > > > I'm not getting any logging out of java.util.Logger. I looked for the > > normal logging.properties file, and that's all good, however when I run > > a JUnit test I get no log output at all (not even at WARNING or SEVERE > > levels). It's always worked on Windows. > > > > Any ideas, anyone? > > > > Cheers, > > > > Greg. > > > >
