I'm using SLF4J with Log4J underneath. What access levels should I be setting my loggers to?
static final Logger logger = LoggerFactory.getLogger(ClassName.class);
I'm using SLF4J with Log4J underneath. What access levels should I be setting my loggers to?
static final Logger logger = LoggerFactory.getLogger(ClassName.class);
I think you should use private
access level, because every class should have its own copy of logger. Otherwise we can't tell which class really did the log record.
I always set them to private. Is there any reason any other class would need access to this logger?