- Enclosing class:
- AppLog
public static interface AppLog.Provider
Provide System.Logger implementations that would otherwise default to
System.getLogger(String).
Create an implementation of Provider and declare that to be service loaded by AppLog. We do this either
via module-info provides clause or via META-INF/services/io.avaje.applog.AppLog$Provider (or both).
Note that the io.avaje:avaje-applog-slf4j dependency provides an adapter for slf4j-api.
We can add that to our classpath/module-path and then System.Logger is implemented using slf4j-api.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the logger implementation given the logger name.getLogger(String name, ResourceBundle bundle) Return the logger implementation given the logger name and resource bundle.
-
Method Details
-
getLogger
Return the logger implementation given the logger name.- Parameters:
name- The logger name
-
getLogger
Return the logger implementation given the logger name and resource bundle.- Parameters:
name- The logger namebundle- The resource bundle containing localised messages
-