You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Peter Adolphs <pe...@dfki.de> on 2012/07/25 15:26:40 UTC

exceptions and log levels

Hi!

I've written a CollectionReader implementation that can throw an Exception in
the getNext() method. I've only configured the java.util.logging root logger to
use a ConsoleHandler with Level.ALL. Without touching the log configuration of
the UIMA packages, any Exception thrown in the CollectionReader.getNext() is
just swallowed when running the CPE. Looking at the code (in particular the
ArtifactProducer.readNext() method which calls CollectionReader.getNext()), it
seems that I have to set the log level FINER at the UIMAFramework
("org.apache.uima") logger to see the exceptions. But then I also see all other
sorts of debug traces, e.g. begin and end of processing of an AE. Is this really
intended?

Thanks in advance!

Peter

-- 
Peter Adolphs
DFKI GmbH, Projektbüro Berlin, Alt-Moabit 91c, D-10559 Berlin
telephone: +49 - 30 - 238 95 1826
http://www.dfki.de/~padolphs/
_______________________________________________________________

Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
Firmensitz: Trippstadter Strasse 122, D-67663 Kaiserslautern

Geschaeftsführung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff

Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes

Amtsgericht Kaiserslautern, HRB 2313


Re: exceptions and log levels

Posted by Peter Adolphs <pe...@dfki.de>.
On 25.07.2012 18:54, Jaroslaw Cwiklik wrote:
> Peter, I don't recall a specific reason why Exceptions caught in
> ArtifactProducts.run() method are only logged at Level.FINER. This
> seems wrong to me. I remember putting conditionals around all logging
> though. Perhaps this was a cut and paste mistake. I'll add JIRA to
> fix this.

Awesome! Thank you very much!

> If you want to handle exceptions coming from your CR, just plugin a
> callback listener to the CPM. This listener will be called on an
> exception and you'll get a call back.

Thanks, this works like a charm.

Cheers,

Peter

-- 
Peter Adolphs
DFKI GmbH, Projektbüro Berlin, Alt-Moabit 91c, D-10559 Berlin
telephone: +49 - 30 - 238 95 1826
http://www.dfki.de/~padolphs/
_______________________________________________________________

Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
Firmensitz: Trippstadter Strasse 122, D-67663 Kaiserslautern

Geschaeftsführung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff

Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes

Amtsgericht Kaiserslautern, HRB 2313


Re: exceptions and log levels

Posted by Jaroslaw Cwiklik <ui...@gmail.com>.
Peter, I don't recall a specific reason why Exceptions caught in
ArtifactProducts.run()
method are only logged at Level.FINER. This seems wrong to me. I remember
putting
conditionals around all logging though. Perhaps this was a cut and paste
mistake. I'll
add JIRA to fix this.

If you want to handle exceptions coming from your CR, just plugin a
callback listener
to the CPM. This listener will be called on an exception and you'll get a
call back.

Jerry

On Wed, Jul 25, 2012 at 9:26 AM, Peter Adolphs <pe...@dfki.de>wrote:

> Hi!
>
> I've written a CollectionReader implementation that can throw an Exception
> in
> the getNext() method. I've only configured the java.util.logging root
> logger to
> use a ConsoleHandler with Level.ALL. Without touching the log
> configuration of
> the UIMA packages, any Exception thrown in the CollectionReader.getNext()
> is
> just swallowed when running the CPE. Looking at the code (in particular the
> ArtifactProducer.readNext() method which calls
> CollectionReader.getNext()), it
> seems that I have to set the log level FINER at the UIMAFramework
> ("org.apache.uima") logger to see the exceptions. But then I also see all
> other
> sorts of debug traces, e.g. begin and end of processing of an AE. Is this
> really
> intended?
>
> Thanks in advance!
>
> Peter
>
> --
> Peter Adolphs
> DFKI GmbH, Projektbüro Berlin, Alt-Moabit 91c, D-10559 Berlin
> telephone: +49 - 30 - 238 95 1826
> http://www.dfki.de/~padolphs/
> _______________________________________________________________
>
> Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
> Firmensitz: Trippstadter Strasse 122, D-67663 Kaiserslautern
>
> Geschaeftsführung:
> Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
> Dr. Walter Olthoff
>
> Vorsitzender des Aufsichtsrats:
> Prof. Dr. h.c. Hans A. Aukes
>
> Amtsgericht Kaiserslautern, HRB 2313
>
>