You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2013/07/15 00:40:49 UTC

[jira] [Updated] (UIMA-2421) Not able to change log level programmatically with UIMA logger

     [ https://issues.apache.org/jira/browse/UIMA-2421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor updated UIMA-2421:
---------------------------------

    Fix Version/s:     (was: 2.4.1SDK)
    
> Not able to change log level programmatically with UIMA logger
> --------------------------------------------------------------
>
>                 Key: UIMA-2421
>                 URL: https://issues.apache.org/jira/browse/UIMA-2421
>             Project: UIMA
>          Issue Type: Bug
>          Components: Core Java Framework
>    Affects Versions: 2.4.0SDK
>            Reporter: Jerry Cwiklik
>            Priority: Minor
>
> UIMA Logger setLevel(Level) only partially works. It changes the level associated with the logger, but its not changing a level in any of its handlers (like ConsoleHandler). So the code,
> logger.setLevel(Level.FINEST);
> if ( logger.isLoggable(Level.FINEST) ) {
> } 
> works fine. What does *not* work is the following:
> logger.log(Level.FINEST, aMessage);
> The only workaround for this is to use, now deprecated, setOutputStream(System.out). 
> Possible fix could be Uima Logger API extension to return an array of handlers associated with a logger. The client application can than decide appropriate log levels for each of the handlers programatically. 
> Another fix for this is to change setLevel(Level) implementation, and apply the new setting across all the handlers associated with the logger. This is less flexible than the first but perhaps more convenient.
> Any thoughts? 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira