For the methods that do not take an explicit source name and method name, the Logging framework will make a "best effort" to determine which class and method called into the logging method. However, it is important to realize that this automatically inferred information may only be approximate (or may even be quite wrong!). Virtual machines are allowed to do extensive optimizations when JITing and may entirely remove stack frames, making it impossible to reliably locate the calling class and method.
We must know, we will know. -- David Hilbert
We must know, we will know. -- David Hilbert
"I'm not back." - Bill Harding, Twister
Originally posted by Joseph Sweet:
Hi Friends,
I am wondering if there is a reliable way to get the current Class name and Method name.
"I'm not back." - Bill Harding, Twister
"I'm not back." - Bill Harding, Twister
Don't get me started about those stupid light bulbs. |