tag:blogger.com,1999:blog-3317988297735469411.post1880425603931505316..comments2023-09-10T09:17:00.375+01:00Comments on Morgan-Design - Software Engineering and Tech News: AspectJ and Custom Logging AnnotationAnonymoushttp://www.blogger.com/profile/14651660798844283222noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-3317988297735469411.post-24848114418592425102012-12-16T08:40:48.787+00:002012-12-16T08:40:48.787+00:00Hi Andrzej,
I believe that since its just an asp...Hi Andrzej, <br /><br />I believe that since its just an aspect pointcut which is being using to match each logging level I see no reason why you wouldnt be able to simply make the point cut more generic, I found a stack overflow post detailing how someone else has achieve a more generic pointcut, http://stackoverflow.com/a/12187657 . Once your pointcut is being matched, inspect the JoinPoint class which gets exposed, you can find details of the matching advice, here you should be able to find the LogLevel. Hope this helps. <br /><br />Anonymoushttps://www.blogger.com/profile/14651660798844283222noreply@blogger.comtag:blogger.com,1999:blog-3317988297735469411.post-54428415823541417332012-12-14T10:34:52.470+00:002012-12-14T10:34:52.470+00:00Hi James!
You created three separated methods for ...Hi James!<br />You created three separated methods for different log level: logMeInfoWithMethodArgs, logMeWarningWithMethodArgs and logMeDebugWithMethodArgs. Let's consider making one such method common for all log levels - it requires in Aspect class getting information about loglevel related with @LogMe - do you have any idea how to get this?<br />Anonymoushttps://www.blogger.com/profile/07037771322201012209noreply@blogger.com