exceptionfactory commented on PR #11943: URL: https://github.com/apache/nifi/pull/11943#issuecomment-7113978888
> > Thanks @dan-s1, however, on initial review, this does not look like a notable improvement. In general, log statements are better located in-line as opposed to static final variables. More to the point, however, the static final variables still use String concatenation. There may be cases where some of these log statement could be more concise, but that would be best as a separate issue. > > @exceptionfactory I agree with you regarding warn and error logging but for info and debug logging which usually is not emitted I believe there is a savings. For the current debug and info log statements the log template string is constructed only not to be used. Placing them in a static final variable declares the log template once. Perhaps even for the warn and error messages there is also savings as the log template doesn't have to be repeatedly created. I agree there is some marginal savings, but I don't think it it warranted to go in this direction. Instead, I think it would be better to look at shortening these log statements where it makes sense. Another option is to use a multiline string at the point of logging -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
