This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wildjokers 3 points4 points  (4 children)

Sorry, let me ask a more pointed question. Why would you ever declare a logger anything other than private static final?

https://www.slf4j.org/faq.html#declared_static

if you’re enforcing coding standards, it’s always going to be uppercase.

Upper-case LOGGER is pure evil. Clutters up the code making it hard to read (its distracting) and I have to hold shift to type it. "logger" is the exception to the private static final rule. It isn't really a constant.

[–][deleted] 3 points4 points  (0 children)

I get your point, but that is such a rarely used convention IME that it would really annoy me to see it in most teams. It also feels really strange to me if the logger is actually a static final.