From b4c7a96900706da769b557085f5e8584a135add5 Mon Sep 17 00:00:00 2001 From: Andrew DeMaria Date: Fri, 23 Jun 2017 20:27:04 -0600 Subject: [PATCH] Cleanup remanents of old logger Signed-off-by: Andrew DeMaria --- .../java/org/libresonic/player/Logger.java | 123 ------------------ .../playlist/XspfPlaylistImportHandler.java | 5 +- 2 files changed, 3 insertions(+), 125 deletions(-) delete mode 100644 libresonic-main/src/main/java/org/libresonic/player/Logger.java diff --git a/libresonic-main/src/main/java/org/libresonic/player/Logger.java b/libresonic-main/src/main/java/org/libresonic/player/Logger.java deleted file mode 100644 index 2d1a5743..00000000 --- a/libresonic-main/src/main/java/org/libresonic/player/Logger.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - This file is part of Libresonic. - - Libresonic is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Libresonic is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Libresonic. If not, see . - - Copyright 2016 (C) Libresonic Authors - Based upon Subsonic, Copyright 2009 (C) Sindre Mehus - */ -package org.libresonic.player; - -import org.slf4j.LoggerFactory; - -/** - * Proxy to Slf4j Logger. - */ -@Deprecated -public class Logger { - - private final org.slf4j.Logger internalLogger; - - /** - * Creates a logger for the given class. - * @param clazz The class. - * @return A logger for the class. - */ - public static Logger getLogger(Class clazz) { - return new Logger(clazz.getName()); - } - - /** - * Creates a logger for the given namee. - * @param name The name. - * @return A logger for the name. - */ - public static Logger getLogger(String name) { - return new Logger(name); - } - - - private Logger(String name) { - internalLogger = LoggerFactory.getLogger(name); - } - - /** - * Logs a debug message. - * @param message The log message. - */ - public void debug(String message) { - internalLogger.debug(message); - } - - /** - * Logs a debug message. - * @param message The message. - * @param error The optional exception. - */ - public void debug(String message, Throwable error) { - internalLogger.debug(message, error); - } - - /** - * Logs an info message. - * @param message The message. - */ - public void info(String message) { - internalLogger.info(message); - } - - /** - * Logs an info message. - * @param message The message. - * @param error The optional exception. - */ - public void info(String message, Throwable error) { - internalLogger.info(message, error); - } - - /** - * Logs a warning message. - * @param message The message. - */ - public void warn(String message) { - internalLogger.warn(message); - } - - /** - * Logs a warning message. - * @param message The message. - * @param error The optional exception. - */ - public void warn(String message, Throwable error) { - internalLogger.warn(message, error); - } - - /** - * Logs an error message. - * @param message The message. - */ - public void error(String message) { - internalLogger.error(message); - } - - /** - * Logs an error message. - * @param message The message. - * @param error The optional exception. - */ - public void error(String message, Throwable error) { - internalLogger.error(message, error); - } - -} diff --git a/libresonic-main/src/main/java/org/libresonic/player/service/playlist/XspfPlaylistImportHandler.java b/libresonic-main/src/main/java/org/libresonic/player/service/playlist/XspfPlaylistImportHandler.java index 74acd504..1128514e 100644 --- a/libresonic-main/src/main/java/org/libresonic/player/service/playlist/XspfPlaylistImportHandler.java +++ b/libresonic-main/src/main/java/org/libresonic/player/service/playlist/XspfPlaylistImportHandler.java @@ -4,10 +4,11 @@ import chameleon.playlist.SpecificPlaylist; import chameleon.playlist.xspf.Location; import chameleon.playlist.xspf.Playlist; import chameleon.playlist.xspf.StringContainer; -import org.libresonic.player.Logger; import org.libresonic.player.domain.MediaFile; import org.libresonic.player.service.MediaFileService; import org.libresonic.player.util.Pair; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -20,7 +21,7 @@ import java.util.stream.Collectors; @Component public class XspfPlaylistImportHandler implements PlaylistImportHandler { - private static final Logger LOG = Logger.getLogger(XspfPlaylistImportHandler.class); + private static final Logger LOG = LoggerFactory.getLogger(XspfPlaylistImportHandler.class); @Autowired MediaFileService mediaFileService;