diff options
Diffstat (limited to 'juick-www/src/main/java/ru/sape/SapeConnection.java')
-rw-r--r-- | juick-www/src/main/java/ru/sape/SapeConnection.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/juick-www/src/main/java/ru/sape/SapeConnection.java b/juick-www/src/main/java/ru/sape/SapeConnection.java index 99a89302..5c2e3397 100644 --- a/juick-www/src/main/java/ru/sape/SapeConnection.java +++ b/juick-www/src/main/java/ru/sape/SapeConnection.java @@ -1,6 +1,8 @@ package ru.sape; import com.github.ooxi.phparser.SerializedPhpParser; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.BufferedReader; import java.io.IOException; @@ -10,11 +12,9 @@ import java.io.StringWriter; import java.net.HttpURLConnection; import java.net.URL; import java.util.*; -import java.util.logging.Level; -import java.util.logging.Logger; public class SapeConnection { - private static final Logger logger = Logger.getLogger(SapeConnection.class.getName()); + private static final Logger logger = LoggerFactory.getLogger(SapeConnection.class); private final String version = "1.0.3"; private final List<String> serverList = Arrays.asList("dispenser-01.sape.ru", "dispenser-02.sape.ru"); private final String dispenserPath; @@ -81,7 +81,7 @@ public class SapeConnection { } if (data.startsWith("FATAL ERROR:")) { - logger.log(Level.SEVERE, "Sape responded with error: " + data); + logger.error("Sape responded with error: " + data); continue; } @@ -89,7 +89,7 @@ public class SapeConnection { try { cached = (Map<String, Object>) new SerializedPhpParser(data).parse(); } catch (Exception e) { - logger.log(Level.SEVERE, "Can't parse Sape data", e); + logger.error("Can't parse Sape data", e); continue; } @@ -98,7 +98,7 @@ public class SapeConnection { return cached; } - logger.log(Level.SEVERE, "Unable to fetch Sape data"); + logger.error("Unable to fetch Sape data"); return Collections.emptyMap(); } |