-
In java applications, logging statement like if (LOGGER.isDebugEnabled()) {
LOGGER.debug('a log with arg {}', heavySerialization(object));
} But the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @jizhilong! Sorry it took a while to respond; any new discussions now trigger a message in Slack, so we don't miss any from now on. I quite like your suggestion of (only) guarding logging statements that take a potentially expensive method invocation as an argument; it's similar to this issue reported on the rewrite-logging-frameworks repository; you might want to subscribe to that issue. I think it strikes the right balance of only guarding potentially expensive method calls, such that boilerplate is kept to a minimum. If you're up for it we can even coach you to a recipe contribution, in which case it might be easiest to coordinate via Slack. As for your suggestion of changing the code only just before it gets compiled, and keep the code changes out of the code repository: we don't currently have any plans in that direction, but you're welcome to open a separate issue on this repository to track that separately from the logging guard suggestion. |
Beta Was this translation helpful? Give feedback.
Hi @jizhilong! Sorry it took a while to respond; any new discussions now trigger a message in Slack, so we don't miss any from now on.
I quite like your suggestion of (only) guarding logging statements that take a potentially expensive method invocation as an argument; it's similar to this issue reported on the rewrite-logging-frameworks repository; you might want to subscribe to that issue. I think it strikes the right balance of only guarding potentially expensive method calls, such that boilerplate is kept to a minimum. If you're up for it we can even coach you to a recipe contribution, in which case it might be easiest to coordinate via Slack.
As for your suggestion of changing the co…