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/database/LdapProvider.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/database/LdapProvider.java')
-rw-r--r-- | src/org/traccar/database/LdapProvider.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/org/traccar/database/LdapProvider.java b/src/org/traccar/database/LdapProvider.java index eb975ad0f..612abe055 100644 --- a/src/org/traccar/database/LdapProvider.java +++ b/src/org/traccar/database/LdapProvider.java @@ -23,14 +23,17 @@ import javax.naming.directory.InitialDirContext; import javax.naming.directory.SearchControls; import javax.naming.directory.SearchResult; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.traccar.Config; -import org.traccar.helper.Log; import org.traccar.model.User; import java.util.Hashtable; public class LdapProvider { + private static final Logger LOGGER = LoggerFactory.getLogger(LdapProvider.class); + private String url; private String searchBase; private String idAttribute; @@ -85,7 +88,7 @@ public class LdapProvider { if (results.hasMoreElements()) { results.nextElement(); if (results.hasMoreElements()) { - Log.warning("Matched multiple users for the accountName: " + accountName); + LOGGER.warn("Matched multiple users for the accountName: " + accountName); return false; } return true; @@ -117,7 +120,7 @@ public class LdapProvider { if (results.hasMoreElements()) { searchResult = results.nextElement(); if (results.hasMoreElements()) { - Log.warning("Matched multiple users for the accountName: " + accountName); + LOGGER.warn("Matched multiple users for the accountName: " + accountName); return null; } } @@ -155,7 +158,7 @@ public class LdapProvider { user.setLogin(accountName); user.setName(accountName); user.setEmail(accountName); - Log.warning(e); + LOGGER.warn(null, e); } return user; } |