KingAOP icon indicating copy to clipboard operation
KingAOP copied to clipboard

Internal methods marked for logging do not get called

Open cas8180 opened this issue 9 years ago • 3 comments
trafficstars

It would appear that to invoke logging for a method even if its decorated with a logging aspect attribute has to be called externally via the instance of the dynamic object reference. This would be a huge limitation as it appears that internal method call that take place within the class itself never get their respective aspect invoked and thus never get logged as part of a call start. Or whatever other functionality you might introduce other than logging. This would mean that in order to use this framework one would have to change their architecture so that every single method gets called in reference to the dynamic instance of an object and can not call methods internally if they are expecting aspect based behavior to execute.

cas8180 avatar Dec 22 '15 23:12 cas8180

PR is welcome)

AntyaDev avatar Dec 24 '15 11:12 AntyaDev

Wtf?

cas8180 avatar Dec 25 '15 01:12 cas8180

@cas8180 I meant that your pull request is welcome) But I am not sure how to achieve that behavior for internal methods since the "AOP magic" can work only with "dynamic". I agree this is the big limitation. But I think that AOP can be achieved simpler with just composition of functions without any AOP framework. (func1 >> func2 >> func3Logging >> func4)

AntyaDev avatar Dec 25 '15 09:12 AntyaDev