[ https://issues.apache.org/jira/browse/SOLR-15697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris M. Hostetter updated SOLR-15697: -------------------------------------- Attachment: SOLR-15697.patch Status: Open (was: Open) Attaching a patch that adds an ErrorLogMuter class with simple static "factory" methods {{substring(String)}} and {{regex(String)}} to generate instances. {{ErrorLogMuter implements AutoClosable}} so it's easy to wrap test logic that may produce exceptions i na try-with-resources block; it also provides a {{getCount()}} method that tests can use for sanity checking. A few tests have been modified to "demo" this new usage, but this patch also replaces the internals of the {{SolrTestCaseJ4}} methods that depend on {{SolrException.ignorePatterns}} to use {{ErrorLogMuter}} instances under the covers. ---- If folks think this overall API looks ok, I'll move forward with updating the patch to: * replace all {{SolrException.log}} usage in Solr to just call {{log.error(...)}} directly * audit all usage of {{SolrTestCaseJ4.ignoreException(...)}} to ensure it's expecting osmethign in the actaul log message, ant no deep in the stacktrace of the Throwable. > replace SolrException.ignorePatterns with something that doesn't depend on > SolrException.log() > ---------------------------------------------------------------------------------------------- > > Key: SOLR-15697 > URL: https://issues.apache.org/jira/browse/SOLR-15697 > Project: Solr > Issue Type: Sub-task > Reporter: Chris M. Hostetter > Assignee: Chris M. Hostetter > Priority: Major > Attachments: SOLR-15697.patch > > > We should deprecated & remove the following code: > * {{SolrException.log()}} > * {{SolrException.ignorePatterns}} > * {{SolrTestCaseJ4.ignoreException()}} > * {{SolrTestCaseJ4.unIgnoreException()}} > * {{SolrTestCaseJ4.resetExceptionIgnores()}} > ...and replace with something that hooks directly into logj4 Filtering -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org