File tree Expand file tree Collapse file tree
google-cloud-translate/src/main/java/com/google/cloud/translate Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,30 +155,28 @@ private TranslateOptions(Builder builder) {
155155 apiKey = null ;
156156 if (builder .apiKey != null ) {
157157 logger .log (
158- Level .WARNING , "Ignoring API key: using explicit setting for credentials instead." );
158+ Level .WARNING ,
159+ "Ignoring API key: using explicit setting for credentials instead." );
159160 } else if (getDefaultApiKey () != null ) {
160161 logger .log (
161162 Level .WARNING ,
162- String .format (
163- "Ignoring API key set in environment variable %s: using explicit setting for credentials instead." ,
164- API_KEY_ENV_NAME ));
163+ "Ignoring API key set in environment variable {0}: using explicit setting for credentials instead." ,
164+ API_KEY_ENV_NAME );
165165 }
166166 } else if (builder .apiKey != null ) {
167167 credentials = null ;
168168 apiKey = builder .apiKey ;
169169 logger .log (
170170 Level .WARNING ,
171- String .format (
172- "Ignoring Application Default Credentials: using explicit setting for API key instead." ,
173- ServiceOptions .CREDENTIAL_ENV_NAME ));
171+ "Ignoring Application Default Credentials {0}: using explicit setting for API key instead." ,
172+ ServiceOptions .CREDENTIAL_ENV_NAME );
174173 } else if (credentials != null ) { // credentials assigned from ADC in superclass constructor
175174 apiKey = null ;
176175 if (getDefaultApiKey () != null ) {
177176 logger .log (
178177 Level .WARNING ,
179- String .format (
180- "Ignoring API key set in environment variable %s: using Application Default Credentials instead." ,
181- API_KEY_ENV_NAME ));
178+ "Ignoring API key set in environment variable {0}: using Application Default Credentials instead." ,
179+ API_KEY_ENV_NAME );
182180 }
183181 } else {
184182 apiKey = getDefaultApiKey ();
You can’t perform that action at this time.
0 commit comments