diff --git a/dmp-backend/web/src/main/java/eu/eudat/logic/services/helpers/LoggerServiceImpl.java b/dmp-backend/web/src/main/java/eu/eudat/logic/services/helpers/LoggerServiceImpl.java deleted file mode 100644 index 7e4533707..000000000 --- a/dmp-backend/web/src/main/java/eu/eudat/logic/services/helpers/LoggerServiceImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -package eu.eudat.logic.services.helpers; - -import eu.eudat.core.logger.Logger; -import eu.eudat.types.WarningLevel; -import eu.eudat.logic.utilities.interfaces.Applier; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.HashMap; -import java.util.Map; - -/** - * Created by ikalyvas on 3/1/2018. - */ -//@Service("loggerService") -public class LoggerServiceImpl implements LoggerService { - private Logger logger; - private WarningLevel level; - private Map> options = new HashMap<>(); - - public void setLevel(WarningLevel level) { - this.level = level; - } - -// @Autowired - public LoggerServiceImpl(Logger logger) { - this.logger = logger; - this.options.put(WarningLevel.DEBUG, (log, message) -> log.debug(message)); - this.options.put(WarningLevel.INFO, (log, message) -> log.info(message)); - this.options.put(WarningLevel.WARN, (log, message) -> log.warn(message)); - this.options.put(WarningLevel.ERROR, (log, message) -> log.error(message)); - } - - public void log(String message) { - this.options.get(this.level).apply(logger, message); - } - - public void log(String message, WarningLevel level) { - this.options.get(level).apply(logger, message); - } -}