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)" <ui...@incubator.apache.org> on 2007/10/01 21:10:50 UTC

[jira] Created: (UIMA-585) Reduce noisy output when running some CPE tests when run in Maven

Reduce noisy output when running some CPE tests when run in Maven
-----------------------------------------------------------------

                 Key: UIMA-585
                 URL: https://issues.apache.org/jira/browse/UIMA-585
             Project: UIMA
          Issue Type: Test
          Components: Collection Processing
            Reporter: Marshall Schor
            Assignee: Marshall Schor
            Priority: Trivial
             Fix For: 2.3


Many CPE tests use ManageOutputDevice.setAllSystemOutputToNirvana() calls to attempt to stop expected error output from flooding the console.  This works when the tests are run from Eclipse, but fails when run from Maven.  This because the mechanism used is to swap in to System.err and System.out new print streams that throw away their output.  However, if any logging occurs previous to this, the logger will initialize and copy the System.err, for example, so that subsequent setting of it has no effect on logging.  When running from Maven, this happens.

The fix is to use a different mechanism to stop the output due to logging:  UIMAFramework.getLogger().setLevel(Level.OFF).  Ideally this is surrounded by a try / finally block to insure it's put back to INFO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (UIMA-585) Reduce noisy output when running some CPE tests when run in Maven

Posted by "Marshall Schor (JIRA)" <ui...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/UIMA-585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marshall Schor closed UIMA-585.
-------------------------------

    Resolution: Fixed

> Reduce noisy output when running some CPE tests when run in Maven
> -----------------------------------------------------------------
>
>                 Key: UIMA-585
>                 URL: https://issues.apache.org/jira/browse/UIMA-585
>             Project: UIMA
>          Issue Type: Test
>          Components: Collection Processing
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>            Priority: Trivial
>             Fix For: 2.3
>
>
> Many CPE tests use ManageOutputDevice.setAllSystemOutputToNirvana() calls to attempt to stop expected error output from flooding the console.  This works when the tests are run from Eclipse, but fails when run from Maven.  This because the mechanism used is to swap in to System.err and System.out new print streams that throw away their output.  However, if any logging occurs previous to this, the logger will initialize and copy the System.err, for example, so that subsequent setting of it has no effect on logging.  When running from Maven, this happens.
> The fix is to use a different mechanism to stop the output due to logging:  UIMAFramework.getLogger().setLevel(Level.OFF).  Ideally this is surrounded by a try / finally block to insure it's put back to INFO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.