4444import com .taboola .rest .api .internal .config .SerializationConfig ;
4545import com .taboola .rest .api .internal .serialization .SerializationMapperCreator ;
4646import com .taboola .rest .api .model .CommunicationInterceptor ;
47+ import com .taboola .rest .api .model .HttpLoggingLevel ;
4748import com .taboola .rest .api .model .NoOpCommunicationInterceptor ;
4849import com .taboola .rest .api .model .RequestHeader ;
4950import com .taboola .rest .api .model .RequestHeadersSupplier ;
@@ -184,7 +185,7 @@ public static class BackstageBuilder {
184185 private static final String DEFAULT_BACKSTAGE_HOST = "https://backstage.taboola.com/backstage/" ;
185186 private static final String DEFAULT_AUTH_BACKSTAGE_HOST = "https://authentication.taboola.com/authentication/" ;
186187 private static final String DEFAULT_USER_AGENT = "Taboola Java Client" ;
187- private static final String VERSION = "1.1.10 " ;
188+ private static final String VERSION = "1.1.11 " ;
188189 private static final SerializationConfig DEFAULT_SERIALIZATION_CONFIG = new SerializationConfig ();
189190 private static final CommunicationInterceptor DEFAULT_COMMUNICATION_INTERCEPTOR = new NoOpCommunicationInterceptor ();
190191 private String baseUrl ;
@@ -202,6 +203,7 @@ public static class BackstageBuilder {
202203 private Collection <RequestHeader > headers ;
203204 private RequestHeadersSupplier headersSupplier ;
204205 private CommunicationInterceptor communicationInterceptor ;
206+ private HttpLoggingLevel loggingLevel ;
205207
206208 public BackstageBuilder setBaseUrl (String baseUrl ) {
207209 this .baseUrl = baseUrl ;
@@ -278,6 +280,11 @@ public BackstageBuilder setCommunicationInterceptor(CommunicationInterceptor com
278280 return this ;
279281 }
280282
283+ public BackstageBuilder setLoggingLevel (HttpLoggingLevel loggingLevel ) {
284+ this .loggingLevel = loggingLevel ;
285+ return this ;
286+ }
287+
281288 public Backstage build () {
282289 organizeState ();
283290
@@ -296,6 +303,7 @@ public Backstage build() {
296303 .setExceptionFactory (new BackstageAPIExceptionFactory (objectMapper ))
297304 .setUserAgentSuffix (userAgent )
298305 .setCommunicationInterceptor (communicationInterceptor )
306+ .setLoggingLevel (loggingLevel )
299307 .setDebug (debug );
300308
301309 RestAPIClient backstageClient = restAPIClientBuilder .setBaseUrl (baseUrl ).setUserAgentPrefix ("Backstage" ).build ();
@@ -342,6 +350,9 @@ private void organizeState() {
342350 if (communicationInterceptor == null ) {
343351 communicationInterceptor = DEFAULT_COMMUNICATION_INTERCEPTOR ;
344352 }
353+ if (loggingLevel == null ) {
354+ loggingLevel = HttpLoggingLevel .BASIC ;
355+ }
345356 }
346357 }
347358}
0 commit comments