diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-14 14:33:49 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-09-14 14:33:49 +1200 |
commit | b10824bb5769c4abb93e3451673b88efdfb9d467 (patch) | |
tree | c4d04ed2f19d5758a75b702467dbc051c5d0511c /src/org/traccar/web/WebServer.java | |
parent | e331573c0df7467fd36ae3eba3c259ed9b1d9253 (diff) | |
download | trackermap-server-b10824bb5769c4abb93e3451673b88efdfb9d467.tar.gz trackermap-server-b10824bb5769c4abb93e3451673b88efdfb9d467.tar.bz2 trackermap-server-b10824bb5769c4abb93e3451673b88efdfb9d467.zip |
Log using slf4j and java logging
Diffstat (limited to 'src/org/traccar/web/WebServer.java')
-rw-r--r-- | src/org/traccar/web/WebServer.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java index 13eebf34f..32c336164 100644 --- a/src/org/traccar/web/WebServer.java +++ b/src/org/traccar/web/WebServer.java @@ -32,6 +32,8 @@ import org.eclipse.jetty.webapp.WebAppContext; import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.servlet.ServletContainer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.traccar.Config; import org.traccar.Context; import org.traccar.api.AsyncSocketServlet; @@ -41,7 +43,6 @@ import org.traccar.api.ObjectMapperProvider; import org.traccar.api.ResourceErrorHandler; import org.traccar.api.SecurityRequestFilter; import org.traccar.api.resource.ServerResource; -import org.traccar.helper.Log; import javax.naming.InitialContext; import javax.servlet.DispatcherType; @@ -56,6 +57,8 @@ import java.util.EnumSet; public class WebServer { + private static final Logger LOGGER = LoggerFactory.getLogger(WebServer.class); + private Server server; private final Config config; private final DataSource dataSource; @@ -150,7 +153,7 @@ public class WebServer { javax.naming.Context context = new InitialContext(); context.bind("java:/DefaultDS", dataSource); } catch (Exception error) { - Log.warning(error); + LOGGER.warn(null, error); } WebAppContext app = new WebAppContext(); @@ -196,7 +199,7 @@ public class WebServer { try { server.start(); } catch (Exception error) { - Log.warning(error); + LOGGER.warn(null, error); } } @@ -204,7 +207,7 @@ public class WebServer { try { server.stop(); } catch (Exception error) { - Log.warning(error); + LOGGER.warn(null, error); } } |