Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

log property in util class  RSS feed

 
Paras Jain
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a util class under src/groovy directory. I am not getting the automatically injected log property here. What is the best way to get that property in java or groovy classes.

I have tried Logger.getRootLogger() but it returns null. Any ideas?

Regards,
Paras
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should just do Logger.getLogger(getClass());
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!