-
Nov 16th, 2012, 01:02 PM
#1
Slf4j addon or annotation for Roo?
Hi,
I'm new to Roo, but one of the things I like about it so far is that it eliminates a lot of the tedium and boiler-plate code. However, I'm amazed that I am unable to find a simple Roo annotation or addon that will allow me to eliminate logger declarations.
In pretty much every class, I find myself with code declaring an slf4j logger (ie: LoggerFactory.getLogger(MyClass.class)). Plus, add the imports, etc.
To me, it would seem like something that should be automatic - hence the idea of having it in Roo class. No more need to declare it each time.
Is something like that doable? Is there a reason why it isn't already part of a Roo offering?
Thanks,
Eric
-
Nov 17th, 2012, 11:05 AM
#2
If you use a modern IDE, this is something that is so easily doable with a custom code template that I don't see the need
for a roo plugin.
-
Nov 17th, 2012, 01:07 PM
#3
Sure - I do that already, but part of the beauty of Roo is that it does things automagically for you, and even more importantly, it removes unnecessary clutter from your code. Something like a logger defn with the corresponding imports is, to me, clutter that is not "required". Especially since pretty much every class ends up having it.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules