How to use unboundid debug log and log4j

1k views Asked by At

need help in integrating unboundid debug logs in log4j.

I understand that Debug class is used to get the unboundid logs , but want to have them in log4j files

1

There are 1 answers

0
scthi On BEST ANSWER

Try this:

static {
    // bridge java.util.Logger output to log4j
    System.setProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager");

    // setting the ldap debug level...
    System.setProperty("com.unboundid.ldap.sdk.debug.enabled", "true");
    System.setProperty("com.unboundid.ldap.sdk.debug.level", "FINEST");
    System.setProperty("com.unboundid.ldap.sdk.debug.type", DebugType.getTypeNameList());
  }