You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dawid Weiss (JIRA)" <ji...@apache.org> on 2013/10/29 19:44:25 UTC

[jira] [Commented] (SOLR-5401) In Solr's ResourceLoader, add a check for @Deprecated annotation in the plugin/analysis/... class loading code, so we print a warning in the log if a deprecated factory class is used

    [ https://issues.apache.org/jira/browse/SOLR-5401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13808288#comment-13808288 ] 

Dawid Weiss commented on SOLR-5401:
-----------------------------------

Don't know about solr but for other logging frameworks you attach a listener to the root logger (or the one you're interested in), intercept any log messages, then detach the listener and analyze the forked log contents. Works like a charm for Log4j, don't know if other frameworks have this.

> In Solr's ResourceLoader, add a check for @Deprecated annotation in the plugin/analysis/... class loading code, so we print a warning in the log if a deprecated factory class is used
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-5401
>                 URL: https://issues.apache.org/jira/browse/SOLR-5401
>             Project: Solr
>          Issue Type: Improvement
>          Components: Schema and Analysis
>    Affects Versions: 3.6, 4.5
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 4.6, 5.0
>
>         Attachments: SOLR-5401.patch
>
>
> While changing an antique 3.6 schema.xml to Solr 4.5, I noticed that some factories were deprecated in 3.x and were no longer available in 4.x (e.g. "solr._Language_PorterStemFilterFactory"). If the user would have got a notice before, this could have been prevented and user would have upgraded before.
> In fact the factories were @Deprecated in 3.6, but the Solr loader does not print any warning. My proposal is to add some simple code to SolrResourceLoader that it prints a warning about the deprecated class, if any configuartion setting loads a class with @Deprecated warning. So we can prevent that problem in the future.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org