KEYCLOAK-3535 Tweak logging for SSSD

This commit is contained in:
Stian Thorgersen 2016-09-09 11:31:31 +02:00
parent 1630b9a20c
commit ccb9433e5c
2 changed files with 2 additions and 9 deletions

View file

@ -16,16 +16,11 @@
*/ */
package cx.ath.matthew; package cx.ath.matthew;
import java.util.logging.Level;
import java.util.logging.Logger;
/** /**
* @author <a href="mailto:bruno@abstractj.org">Bruno Oliveira</a>. * @author <a href="mailto:bruno@abstractj.org">Bruno Oliveira</a>.
*/ */
public class LibraryLoader { public class LibraryLoader {
private static final Logger LOGGER = Logger.getLogger(LibraryLoader.class.getSimpleName());
private static final String[] PATHS = {"/usr/lib/", "/usr/lib64/", "/usr/local/lib/", "/opt/local/lib/"}; private static final String[] PATHS = {"/usr/lib/", "/usr/lib64/", "/usr/local/lib/", "/opt/local/lib/"};
private static final String LIBRARY_NAME = "libunix_dbus_java"; private static final String LIBRARY_NAME = "libunix_dbus_java";
private static final String VERSION = "0.0.8"; private static final String VERSION = "0.0.8";
@ -40,12 +35,8 @@ public class LibraryLoader {
} catch (UnsatisfiedLinkError e) { } catch (UnsatisfiedLinkError e) {
loadSucceeded = false; loadSucceeded = false;
} }
} }
if (!loadSucceeded) LOGGER.log(Level.WARNING, "libunix_dbus_java not found\n" +
"Please, make sure you have the package libunix-dbus-java installed.");
return new LibraryLoader(); return new LibraryLoader();
} }

View file

@ -123,6 +123,8 @@ public class Sssd {
sssdAvailable = true; sssdAvailable = true;
} }
connection.disconnect(); connection.disconnect();
} else {
logger.debugv("libunix_dbus_java not found. Federation provider will be disabled.");
} }
} catch (DBusException e) { } catch (DBusException e) {
logger.error("Failed to check the status of SSSD", e); logger.error("Failed to check the status of SSSD", e);