Announcement Announcement Module
Collapse
No announcement yet.
Slf4j addon or annotation for Roo? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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.

    Comment


    • #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.

      Comment

      Working...
      X