@@ -141,6 +141,7 @@ static final class ClosedException extends RuntimeException {
141141 @ VisibleForTesting
142142 SpannerImpl (SpannerRpc gapicRpc , SpannerOptions options ) {
143143 super (options );
144+ logger .log (Level .CONFIG , "Creating Spanner instance" );
144145 this .gapicRpc = gapicRpc ;
145146 this .asyncExecutorProvider =
146147 MoreObjects .firstNonNull (
@@ -149,12 +150,53 @@ static final class ClosedException extends RuntimeException {
149150 this .dbAdminClient = new DatabaseAdminClientImpl (options .getProjectId (), gapicRpc );
150151 this .instanceClient =
151152 new InstanceAdminClientImpl (options .getProjectId (), gapicRpc , dbAdminClient );
153+ logSpannerOptions (options );
152154 }
153155
154156 SpannerImpl (SpannerOptions options ) {
155157 this (options .getSpannerRpcV1 (), options );
156158 }
157159
160+ private void logSpannerOptions (SpannerOptions options ) {
161+ if (logger .isLoggable (Level .CONFIG )) {
162+ logger .log (
163+ Level .CONFIG ,
164+ "Spanner options: "
165+ + "\n Project ID: "
166+ + options .getProjectId ()
167+ + "\n Host: "
168+ + options .getHost ()
169+ + "\n Num gRPC channels: "
170+ + options .getNumChannels ()
171+ + "\n Leader aware routing enabled: "
172+ + options .isLeaderAwareRoutingEnabled ()
173+ + "\n Direct access enabled: "
174+ + options .isEnableDirectAccess ()
175+ + "\n Active Tracing Framework: "
176+ + SpannerOptions .getActiveTracingFramework ()
177+ + "\n API tracing enabled: "
178+ + options .isEnableApiTracing ()
179+ + "\n Extended tracing enabled: "
180+ + options .isEnableExtendedTracing ()
181+ + "\n End to end tracing enabled: "
182+ + options .isEndToEndTracingEnabled ()
183+ + "\n Built-in metrics enabled: "
184+ + options .isEnableBuiltInMetrics ()
185+ + "\n Session pool min sessions: "
186+ + options .getSessionPoolOptions ().getMinSessions ()
187+ + "\n Session pool max sessions: "
188+ + options .getSessionPoolOptions ().getMaxSessions ()
189+ + "\n Multiplexed sessions enabled: "
190+ + options .getSessionPoolOptions ().getUseMultiplexedSession ()
191+ + "\n Multiplexed sessions enabled for RW: "
192+ + options .getSessionPoolOptions ().getUseMultiplexedSessionForRW ()
193+ + "\n Multiplexed sessions enabled for blind write: "
194+ + options .getSessionPoolOptions ().getUseMultiplexedSessionBlindWrite ()
195+ + "\n Multiplexed sessions enabled for partitioned ops: "
196+ + options .getSessionPoolOptions ().getUseMultiplexedSessionPartitionedOps ());
197+ }
198+ }
199+
158200 /** Returns the {@link SpannerRpc} of this {@link SpannerImpl} instance. */
159201 SpannerRpc getRpc () {
160202 return gapicRpc ;
0 commit comments