* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.aaa.datastore.h2;
+import com.google.common.base.MoreObjects;
import java.io.File;
import org.immutables.value.Value;
import org.immutables.value.Value.Default;
import org.immutables.value.Value.Immutable;
import org.immutables.value.Value.Style.ImplementationVisibility;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
- * Responsible for providing configuration properties for the IDMLight/H2 data
- * store implementation.
+ * Responsible for providing configuration properties for the IDMLight/H2 data store implementation.
*
* @author peter.mellquist@hp.com - Initial contribution
- * @author Michael Vorburger.ch - Made it configurable, as Immutable with
- * Builder
+ * @author Michael Vorburger.ch - Made it configurable, as Immutable with a Builder
*/
@Immutable
@Value.Style(strictBuilder = true, builder = "new",
typeImmutable = "*Impl", visibility = ImplementationVisibility.PRIVATE)
public abstract class IdmLightConfig {
-
- private static final Logger LOG = LoggerFactory.getLogger(IdmLightConfig.class);
-
/**
* The filename for the H2 database file.
*
return getDbConnectionStringPrefix() + getDbDirectory() + File.separatorChar + getDbName();
}
- public void log() {
- LOG.info("DB Path : {}", getDbConnectionString());
- LOG.info("DB Driver : {}", getDbDriver());
- LOG.info("DB Valid Time Out : {}", getDbValidTimeOut());
+ @Override
+ public final String toString() {
+ return MoreObjects.toStringHelper(this)
+ .add("path", getDbConnectionString())
+ .add("driver", getDbDriver())
+ .add("validity timeout", getDbValidTimeOut())
+ .toString();
}
}