uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: CAS Visual Debugger ignoring logger properties
Date Fri, 30 Jul 2010 18:40:31 GMT

On 7/30/2010 11:55 AM, Thilo Goetz wrote:
> On 7/30/2010 12:14, Armin.Wegner@bka.bund.de wrote:
>> Hello,
>> The CAS Visual Debugger ingores the logger properties file. It does not log
>> to console und writes uima.log into my home directory. The VM arguments in
>> Eclipse's Run Configuration say:
>> "-Djava.util.logging.config.file=${project_loc}/conf/FileConsoleLogger.properties"
>> The logger is used by
>> this.getContext().getLogger().Log(Level.INFO, ...);
>> in a very simple annotator using Java regular expressions. It is as simple as
>> one of the easiest examples given in the UIMA tutorial.
>> Thanks
>> Armin
> Yes, that's probably true.  I think what happens, but I'm
> by no means sure, is that CVD uses the UIMA core logging
> setup, which I think is defined in a logging properties
> file somewhere.  Feel free to submit a patch if this is
> a big enough issue for you.
> While looking at the code, I also saw that CVD is trying
> to load its own private logging properties file, which
> no longer seems to exist.  No idea when that happened.

The code in the CVD doesn't use the -D settings for logging, and instead, has
hard-coded to load the property file specified by this declaration in the code:

private static final String loggerPropertiesFileName =

I think this is the file Thilo is referring to above, which he says no longer
seems to exist, but I can see it in my Eclipse workspace (which has the
uimaj-tools project) and it is being loaded (I can change things here, and it
has the appropriate effect).

You can have a look at the code that's doing this in:

uimaj-tools project, under src/main/java/org/apache/uima/tools/cvd/MainFrame.java.

Here's a link:

scroll down to line 1289, the method "initializeLogging".

If you change the log file name here, that log file will be used, but the part
of the CVD that implements the menu Tools -> View Log File, breaks, because it's
hard-coded to look for the log in the Java "user.home" property / uima.log.

So, an appropriate patch might be to first see if the logging properties file
was specified using the -D property, and if not, keep things as they are.  If it
was specified, then some kind of loading and subsequent querying of the settings
to see if file logging was specified, and then to obtain the path to the log
file being used, would be needed, to enable the CVD Tools -> View Log File menu
item to find the log file.  (If no file logging was specified, then the Tools ->
View Log File should put up an error message saying there's no log file to view
due to the settings of the logging properties file).

> --Thilo

View raw message