You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mike Noordermeer (JIRA)" <ji...@apache.org> on 2011/03/01 17:40:36 UTC

[jira] Created: (CONFIGURATION-439) Should be possible to disable default error log listener

Should be possible to disable default error log listener 
---------------------------------------------------------

                 Key: CONFIGURATION-439
                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-439
             Project: Commons Configuration
          Issue Type: Improvement
          Components: Events & Notifications
    Affects Versions: 1.6, Nightly Builds
            Reporter: Mike Noordermeer


The current version of Commons Configuration always adds a default error listener that logs internal errors. This causes an exception to be logged when, for instance, an optional include from a DefaultConfigurationBuilder is not found. The default error listener can be removed with clearErrorListeners(), but this is not easily possible when recursively including a DefaultConfigurationBuilder config in a DefaultConfigurationBuilder config.

It should be possible to disable the default logging of internal errors, or at least disable the default logging of non-existent optional configuration files.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONFIGURATION-439) Should be possible to disable default error log listener

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003033#comment-13003033 ] 

Oliver Heger commented on CONFIGURATION-439:
--------------------------------------------

Good point.

If DefaultConfigurationBuilders defined in the configuration definition file inherited the properties from the current builder, this would also solve CONFIGURATION-437.

> Should be possible to disable default error log listener 
> ---------------------------------------------------------
>
>                 Key: CONFIGURATION-439
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-439
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: Events & Notifications
>    Affects Versions: 1.6, Nightly Builds
>            Reporter: Mike Noordermeer
>
> The current version of Commons Configuration always adds a default error listener that logs internal errors. This causes an exception to be logged when, for instance, an optional include from a DefaultConfigurationBuilder is not found. The default error listener can be removed with clearErrorListeners(), but this is not easily possible when recursively including a DefaultConfigurationBuilder config in a DefaultConfigurationBuilder config.
> It should be possible to disable the default logging of internal errors, or at least disable the default logging of non-existent optional configuration files.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CONFIGURATION-439) Should be possible to disable default error log listener

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CONFIGURATION-439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oliver Heger resolved CONFIGURATION-439.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.7

The fix for CONFIGURATION-437 also solved this issue.

An additional unit test was added to verify that log output created by nested configuration builders and optional configurations is actually suppressed if the error listeners of the original configuration builder have been cleared.

> Should be possible to disable default error log listener 
> ---------------------------------------------------------
>
>                 Key: CONFIGURATION-439
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-439
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: Events & Notifications
>    Affects Versions: 1.6, Nightly Builds
>            Reporter: Mike Noordermeer
>             Fix For: 1.7
>
>
> The current version of Commons Configuration always adds a default error listener that logs internal errors. This causes an exception to be logged when, for instance, an optional include from a DefaultConfigurationBuilder is not found. The default error listener can be removed with clearErrorListeners(), but this is not easily possible when recursively including a DefaultConfigurationBuilder config in a DefaultConfigurationBuilder config.
> It should be possible to disable the default logging of internal errors, or at least disable the default logging of non-existent optional configuration files.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (CONFIGURATION-439) Should be possible to disable default error log listener

Posted by "Oliver Heger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002993#comment-13002993 ] 

Oliver Heger commented on CONFIGURATION-439:
--------------------------------------------

Would it make sense to add an option to the _header_ section of the configuration definition file read by {{DefaultConfigurationBuilder}} which controls whether an error listener is added or not? Or how would you like this option to be enabled or disabled?

> Should be possible to disable default error log listener 
> ---------------------------------------------------------
>
>                 Key: CONFIGURATION-439
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-439
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: Events & Notifications
>    Affects Versions: 1.6, Nightly Builds
>            Reporter: Mike Noordermeer
>
> The current version of Commons Configuration always adds a default error listener that logs internal errors. This causes an exception to be logged when, for instance, an optional include from a DefaultConfigurationBuilder is not found. The default error listener can be removed with clearErrorListeners(), but this is not easily possible when recursively including a DefaultConfigurationBuilder config in a DefaultConfigurationBuilder config.
> It should be possible to disable the default logging of internal errors, or at least disable the default logging of non-existent optional configuration files.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONFIGURATION-439) Should be possible to disable default error log listener

Posted by "Mike Noordermeer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CONFIGURATION-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002995#comment-13002995 ] 

Mike Noordermeer commented on CONFIGURATION-439:
------------------------------------------------

Could be, but maybe you do want to log errors other than non-existent optional configurations (imho it's weird that gets logged as an error anyway).

But I think the fundamental problem is in the fact that most settings don't seem to be inherited by child DefaultConfigurationBuilders. IMO, you would expect the child builders (and maybe even the configurations) to inherit settings like the error and change listeners, but also things like setDelimiterParsingDisabled().

> Should be possible to disable default error log listener 
> ---------------------------------------------------------
>
>                 Key: CONFIGURATION-439
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-439
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: Events & Notifications
>    Affects Versions: 1.6, Nightly Builds
>            Reporter: Mike Noordermeer
>
> The current version of Commons Configuration always adds a default error listener that logs internal errors. This causes an exception to be logged when, for instance, an optional include from a DefaultConfigurationBuilder is not found. The default error listener can be removed with clearErrorListeners(), but this is not easily possible when recursively including a DefaultConfigurationBuilder config in a DefaultConfigurationBuilder config.
> It should be possible to disable the default logging of internal errors, or at least disable the default logging of non-existent optional configuration files.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira