From: Robert Varga Date: Wed, 6 Jul 2022 00:22:11 +0000 (+0200) Subject: Remove IdlLightConfig.log() X-Git-Tag: v0.16.0~10 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=366cc804da1c87e6081ff954c15942bba41e8f5a;p=aaa.git Remove IdlLightConfig.log() Implement a proper toString() rather than a dedicated log() method. Change-Id: If102dd9e526e4bccd6c3617b97603932d5eb8750 Signed-off-by: Robert Varga --- diff --git a/aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/IdmLightConfig.java b/aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/IdmLightConfig.java index ade3e70fb..1c362821c 100644 --- a/aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/IdmLightConfig.java +++ b/aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/IdmLightConfig.java @@ -5,32 +5,25 @@ * 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. * @@ -106,9 +99,12 @@ public abstract class IdmLightConfig { 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(); } }