Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ConsoleEngine implements ILoggerFactory {
- private ConcurrentHashMap<String, Logger> loggerCache = new ConcurrentHashMap<>();
- public static ConsoleEngine getInstance() {
- if (INSTANCE == null)
- INSTANCE = new ConsoleEngine();
- return INSTANCE;
- }
- @Override
- public Logger getLogger(String name) {
- Logger logger = loggerCache.get(name);
- if (logger == null) {
- logger = new Logger(name);
- loggerCache.put(name, logger);
- }
- return logger;
- }
- //... More methods follow here, but they are not interacting with the logging setup at all
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement