No, you didn’t miss it. Now that I look at it ReflectionUtil is only getting the Class of the caller. We actually need the stack trace entry. Here is where the Java 9 stack walker API will help (I hope).
Ralph > On Feb 8, 2016, at 11:51 AM, Matt Sicker <[email protected]> wrote: > > I did a bit of refactoring when I put everything together in ReflectionUtil. > I probably just missed that. I don't see any reason not to use it. > > On 8 February 2016 at 12:12, Ralph Goers <[email protected] > <mailto:[email protected]>> wrote: > I just now noticed that Log4jLogEvent’s calcLocation method is using a > Throwable to locate the caller. For some reason I thought this was using > ReflectionUtil.getCallerClass(fqcn). I don’t know how this slipped through > as I believe it should improve logging with location information quite a bit. > > Can anyone think of a reason not to do this? > > Ralph > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > <mailto:[email protected]> > For additional commands, e-mail: [email protected] > <mailto:[email protected]> > > > > > -- > Matt Sicker <[email protected] <mailto:[email protected]>>
