[slf4j-user] SLF4J Helper for NetBeans IDE now available
Daniel Trebbien
dtrebbien at gmail.com
Sun Jul 30 21:42:37 CEST 2017
Hello Jeff,
That's neat! I did not know about findbugs-slf4j. I will check it out.
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.
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:
https://github.com/apache/activemq/pull/257/commits/1ec6bfe9f671415f971af1d8b435bd7ba902cf3d
*---
a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java*
*+++
b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java*
@@ -199,7 +199,7 @@ public class MultiKahaDBPersistenceAdapter extends
LockableServiceSupport implem
if (filteredAdapter.getDestination() == matchAll &&
filteredAdapter.isPerDestination()) {
filteredAdapter = addAdapter(filteredAdapter, destination);
if (LOG.isTraceEnabled()) {
- LOG.info("created per destination adapter for: " +
destination + ", " + result);
+ LOG.trace("created per destination adapter for: " +
destination + ", " + result);
}
}
startAdapter(filteredAdapter.getPersistenceAdapter(),
destination.getQualifiedName());
@@ -331,11 +331,11 @@ public class MultiKahaDBPersistenceAdapter extends
LockableServiceSupport implem
if (adapterDir != null) {
if (IOHelper.deleteFile(adapterDir)) {
if (LOG.isTraceEnabled()) {
- LOG.info("deleted per destination adapter directory
for: " + destination);
+ LOG.trace("deleted per destination adapter directory
for: " + destination);
}
} else {
if (LOG.isTraceEnabled()) {
- LOG.info("failed to deleted per destination adapter
directory for: " + destination);
+ LOG.trace("failed to deleted per destination adapter
directory for: " + destination);
}
}
}
Daniel
On Sun, Jul 30, 2017 at 12:07 PM, Jeff Jensen <jjensen at apache.org> wrote:
> Any IDE that runs FindBugs or SpotBugs can use the FindBugs SLF4J ruleset,
> which is free and open source:
> https://kengotoda.github.io/findbugs-slf4j/
>
> Been using it for years and it works well.
>
>
> On Sun, Jul 30, 2017 at 12:50 PM, Daniel Trebbien <dtrebbien at gmail.com>
> wrote:
>
>> Hello Joachim,
>>
>> 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
>> TypeMirror
>> <http://docs.oracle.com/javase/7/docs/api/javax/lang/model/type/TypeMirror.html>
>> et al.
>>
>> "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.
>>
>> Daniel
>>
>>
>> On Sat, Jul 29, 2017 at 11:49 PM, Joachim Durchholz <jo at durchholz.org>
>> wrote:
>>
>>> Interesting! Now I'd like to see a similar plugin for Eclipse :-)
>>>
>>> The plugin is listed as "commercial" - is that intentional?
>>>
>>> Regards,
>>> Jo
>>>
>>>
>>> Am 30.07.2017 um 00:54 schrieb Daniel Trebbien:
>>>
>>>> Hello,
>>>>
>>>> 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:
>>>> http://plugins.netbeans.org/plugin/72557/
>>>>
>>>> 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.
>>>>
>>>> Maybe others will find the plugin useful.
>>>>
>>>> Sincerely,
>>>>
>>>> Daniel Trebbien
>>>>
>>>>
>>>> _______________________________________________
>>>> slf4j-user mailing list
>>>> slf4j-user at qos.ch
>>>> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>>>>
>>>>
>>> _______________________________________________
>>> slf4j-user mailing list
>>> slf4j-user at qos.ch
>>> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>>
>>
>>
>> _______________________________________________
>> slf4j-user mailing list
>> slf4j-user at qos.ch
>> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>>
>
>
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20170730/4c881534/attachment-0001.html>
More information about the slf4j-user
mailing list