title: Any way to tell a class is from Groovy/Grails or original Java?
body: <p>People using Grails/Groovy should know that when using log4j to log message will happen that the method name and the line number in log message are both wrong.</p>
  
  <p>So I customized my own PatternLayout. PatternLayout, and LocationInfo following this url: <a href="http://web.archive.org/web/20100724050702/http://www.kotek.net/projects/log4j-groovy" rel="nofollow">log4j-groovy</a></p>
  
  <p>However, when a normal java class calls my customized PatternLayout, the method name is wrong.</p>
  
  <p>What I can think the simplest way is to let my PatternLayout to know whether a caller is a Groovy class or a normal Java class so that my PatternLayout can know the way it should approach.</p>
  
  <p>So, is there any way to know a caller (class) is from Groovy or from Java ?</p>
  
  <p>Thank you.</p>