Is it possible to retrieve loggers without going through the static methods in LoggerFactory?
Yes. LoggerFactory is essentially a wrapper around an ILoggerFactory instance. The ILoggerFactory instance in use is determined according to the static binding conventions of the SLF4J framework. See the getSingleton() method in LoggerFactory for details. However, nothing prevents you from using your own ILoggerFactory instance. Note that you can also obtain a reference to the ILoggerFactory that the LoggerFactory class is using by invoking the LoggerFactory.getILoggerFactory() method. Thus, if SLF4J binding conventions do not fit your needs, or if you need additional flexibility, then do consider using the ILoggerFactory interface as an alternative to inventing your own logging API.
Related Questions
- Is it possible to create static properties/methods of a bean class? Does the beans spec cover this and can builder tools handle a singleton bean, for example?
- IS IT POSSIBLE TO LEARN IN A SHORT TIME WITHOUT SPENDING YEARS GOING THROUGH COLORED BELTS?
- Is it possible to use a WLAN card configured with a static IP address?