You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How does one achieve logging of a method, but with no method parameters logged? I am only interested in logging that we are now entering method X and exiting method X.
I was hoping that one could simply avoid to annotate any method parameters with @lp, but it seems that no @lp annotation causes all parameters to be logged. I see that there are test cases, which specifically asserts this behavior so I assume that this is not a bug but intended behavior.
(To achieve what I would like one would probably have to delete the conditional empty check (and content of the scope) on the BitSet called lpParameters in the method: ArgumentDescriptor.Builder.build())
The text was updated successfully, but these errors were encountered:
Hi, that's right, if there is no at least a single @lp annotation then all parameters are added in a log record. It is possible to change this behavior only via source code modification.
Ok, thanks.
Another question: I can only get the logging to work on endpoints, not on regular methods. Shouldn't the AOP weave logging into all public methods annotated with fx @LogInfo? Or is the AOPLogger somehow defined to only add logging to spring rest endpoints?
Hi,
Logging works for spring managed beans only. So, all components (services, controllers, etc) created by spring framework are applicable for logging via log annotation. All objects which are created manually, e.g. using new operator are not used for log annotation processing.
Regards,
Nikolay среда, 15 августа 2018г., 09:58 +03:00 от Anders [email protected] :
Ok, thanks.
Another question: I can only get the logging to work on endpoints, not on regular methods. Shouldn't the AOP weave logging into all public methods annotated with fx @LogInfo ? Or is the AOPLogger somehow defined to only add logging to spring rest endpoints?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub , or mute the thread .
Hi
How does one achieve logging of a method, but with no method parameters logged? I am only interested in logging that we are now entering method X and exiting method X.
I was hoping that one could simply avoid to annotate any method parameters with @lp, but it seems that no @lp annotation causes all parameters to be logged. I see that there are test cases, which specifically asserts this behavior so I assume that this is not a bug but intended behavior.
(To achieve what I would like one would probably have to delete the conditional empty check (and content of the scope) on the BitSet called lpParameters in the method:
ArgumentDescriptor.Builder.build()
)The text was updated successfully, but these errors were encountered: