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

Erick Erickson updated SOLR-14523:
----------------------------------
    Attachment: validation.patch
        Status: Open  (was: Open)

[~asalamon74] Are you on the Apache Slack channel? Or maybe we can connect on 
Google? Something interactive if the short form below doesn't work. I've 
outlined each step I use, although you are probably familiar with most of them 
already.

- Apply the "validation.patch" I've attached.

- I often start with "git clean -dxf" if I've used Ant because sometimes mixing 
Ant and Gradle can confuse things.

- "gradlew idea" will create the project that you can open up in IntelliJ, go 
ahead and open it.

- IntelliJ should ask you if you want it to import the Gradle project, say yes.

- In my setup, over on the right side there's both an "ant" and "gradle" tab. 
Usually the gradle window opens automatically if I import the Gradle project, 
but if not It's easy to miss, it's on the _extreme_ right. Find it and click it.

- Expand the project, then Tasks, then verification, then double-click 
"validateLogCalls". You can execute this either at the root, or the individual 
lucene or solr nodes.

what you should see pretty soon is a window open up with any violations 
reported and clicking on the link in that window should take you to the source 
line.

Let me know if any of that doesn't work. I'm using the Community Edition of 
IntelliJ, 2020.1.1

And here's one case where I don't follow the patch naming convention. When 
these are all fixed up, we can include the gradle change in the final patch.

Oh, and if you find any cases that the valiation task misses, let me know 
and/or just fix the code if you're comfortable with Groovy in 
"./gradle/validation/validate-log-calls.gradle"

Finally, "gradlew helpValidateLogCalls" will print out a lot of text about 
this, if you'd like to add anything for getMessage and/or GetCause, just edit 
help/validateLogCalls.txt

Thanks!

> Enhance gradle logging calls validation: eliminate getMessage()
> ---------------------------------------------------------------
>
>                 Key: SOLR-14523
>                 URL: https://issues.apache.org/jira/browse/SOLR-14523
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Andras Salamon
>            Assignee: Erick Erickson
>            Priority: Minor
>         Attachments: validation.patch
>
>
> SOLR-14280 fixed a logging problem in SolrConfig by removing a few 
> getMessage() calls. We could enhance this solution by modifying gradle's 
> logging calls validation and forbid getMessage() calls during logging. We 
> should check the existing code and eliminate such calls.
> It is possible to suppress the warning using {{//logok}}.
> [~erickerickson] [~gerlowskija]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to