<div dir="ltr">Hello Jeff,<div><br></div><div>That's neat! I did not know about findbugs-slf4j. I will check it out.</div><div><br></div><div>Two advantages of a plugin are (at least for NetBeans) the ability to do "live" checking and provide automatic fixes that automatically rewrite the code.</div><div><br></div><div>It appears that findbugs-slf4j has some checks that my plugin does not, and vice versa. For example, I have thought about adding something similar to the SLF4J_ILLEGAL_PASSED_CLASS check to my plugin. findbugs-slf4j could use some checks for code involving the is*Enabled() APIs, to catch issues like: <a href="https://github.com/apache/activemq/pull/257/commits/1ec6bfe9f671415f971af1d8b435bd7ba902cf3d">https://github.com/apache/activemq/pull/257/commits/1ec6bfe9f671415f971af1d8b435bd7ba902cf3d</a></div><div><br></div><div><p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b><font face="monospace, monospace">--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java</font></b></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><b><font face="monospace, monospace">+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java</font></b></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><font face="monospace, monospace"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(51,187,200)">@@ -199,7 +199,7 @@</span><span style="font-variant-ligatures:no-common-ligatures"> public class MultiKahaDBPersistenceAdapter extends LockableServiceSupport implem</span></font></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> if (filteredAdapter.getDestination() == matchAll && filteredAdapter.isPerDestination()) {</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> filteredAdapter = addAdapter(filteredAdapter, destination);</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> if (LOG.isTraceEnabled()) {</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(195,55,32)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace">- LOG.info("created per destination adapter for: " + destination + ", " + result);</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(52,188,38)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace">+ LOG.trace("created per destination adapter for: " + destination + ", " + result);</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> }</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> }</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> startAdapter(filteredAdapter.getPersistenceAdapter(), destination.getQualifiedName());</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><font face="monospace, monospace"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(51,187,200)">@@ -331,11 +331,11 @@</span><span style="font-variant-ligatures:no-common-ligatures"> public class MultiKahaDBPersistenceAdapter extends LockableServiceSupport implem</span></font></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> if (adapterDir != null) {</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> if (IOHelper.deleteFile(adapterDir)) {</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> if (LOG.isTraceEnabled()) {</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(195,55,32)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace">- LOG.info("deleted per destination adapter directory for: " + destination);</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(52,188,38)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace">+ LOG.trace("deleted per destination adapter directory for: " + destination);</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> }</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> } else {</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> if (LOG.isTraceEnabled()) {</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(195,55,32)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace">- LOG.info("failed to deleted per destination adapter directory for: " + destination);</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(52,188,38)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace">+ LOG.trace("failed to deleted per destination adapter directory for: " + destination);</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> }</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> }</font></span></p>
<p style="margin:0px;font-size:14px;line-height:normal;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace"> }</font></span></p></div><div><br></div><div>Daniel</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jul 30, 2017 at 12:07 PM, Jeff Jensen <span dir="ltr"><<a href="mailto:jjensen@apache.org" target="_blank">jjensen@apache.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Any IDE that runs FindBugs or SpotBugs can use the FindBugs SLF4J ruleset, which is free and open source:<div><a href="https://kengotoda.github.io/findbugs-slf4j/" target="_blank">https://kengotoda.github.io/<wbr>findbugs-slf4j/</a><br></div><div><br></div><div>Been using it for years and it works well.</div><div><div class="gmail-h5"><div><br></div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Sun, Jul 30, 2017 at 12:50 PM, Daniel Trebbien <span dir="ltr"><<a href="mailto:dtrebbien@gmail.com" target="_blank">dtrebbien@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello Joachim,<br><div><br></div><div>Yes, I too would like to see an Eclipse version. I have been looking into this, and I think that it would be possible in some form. It looks like I would need to completely rewrite the code because Eclipse and NetBeans use different APIs. For one thing, Eclipse uses its own AST API whereas NetBeans uses the standard Java Compiler Tree API. The two APIs appear very similar. I am still looking for Eclipse's equivalent of <font face="monospace, monospace"><a href="http://docs.oracle.com/javase/7/docs/api/javax/lang/model/type/TypeMirror.html" target="_blank">TypeMirror</a></font> et al.</div><div><br></div><div>"Commercial" is intended. I would love to make the plugin open source; but, for personal reasons, this seems unwise for me to do at the present time. I have thought about selling licenses to use the plugin or maybe consulting for companies who would like similar plugins made for their internal use. If the former, I would definitely give free licenses to those who provided feedback from trying out these early versions of the plugin.</div><div><br></div><div>Daniel</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 29, 2017 at 11:49 PM, Joachim Durchholz <span dir="ltr"><<a href="mailto:jo@durchholz.org" target="_blank">jo@durchholz.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Interesting! Now I'd like to see a similar plugin for Eclipse :-)<br>
<br>
The plugin is listed as "commercial" - is that intentional?<br>
<br>
Regards,<br>
Jo<div><div class="gmail-m_-4476716084100514457m_1174254605469459574h5"><br>
<br>
Am 30.07.2017 um 00:54 schrieb Daniel Trebbien:<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div class="gmail-m_-4476716084100514457m_1174254605469459574h5">
Hello,<br>
<br>
I have been working on a plugin for NetBeans IDE that highlights usage errors and inefficiencies in Java code using SLF4J. Just a few days ago, the plugin was published on NetBeans' Plugin Portal at: <a href="http://plugins.netbeans.org/plugin/72557/" rel="noreferrer" target="_blank">http://plugins.netbeans.org/pl<wbr>ugin/72557/</a><br>
<br>
I am still testing the plugin, but so far, it has been able to find SLF4J usage errors and inefficiencies in several open source projects.<br>
<br>
Maybe others will find the plugin useful.<br>
<br>
Sincerely,<br>
<br>
Daniel Trebbien<br>
<br>
<br></div></div>
______________________________<wbr>_________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch" target="_blank">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" rel="noreferrer" target="_blank">http://mailman.qos.ch/mailman/<wbr>listinfo/slf4j-user</a><br>
<br>
</blockquote>
<br>
______________________________<wbr>_________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch" target="_blank">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" rel="noreferrer" target="_blank">http://mailman.qos.ch/mailman/<wbr>listinfo/slf4j-user</a></blockquote></div><br></div></div>
<br>______________________________<wbr>_________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch" target="_blank">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" rel="noreferrer" target="_blank">http://mailman.qos.ch/mailman/<wbr>listinfo/slf4j-user</a><br></blockquote></div><br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
slf4j-user mailing list<br>
<a href="mailto:slf4j-user@qos.ch">slf4j-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/slf4j-user" rel="noreferrer" target="_blank">http://mailman.qos.ch/mailman/<wbr>listinfo/slf4j-user</a><br></blockquote></div><br></div></div>