How about this:
private final Logger logger = LoggerFactory.getLogger(getClass());
This approach avoids copy and paste errors.
I read (I don’t remember where, many years ago) that Logger instances are terribly cheap, and it doesn’t matter if each instance of your class has its own journal.
But if you are not convinced, and you want the Logger instance to be static, it should be both final and uppercase, for example:
private static final Logger LOG = LoggerFactory.getLogger(MasterController.class);
source
share