Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ public EosioJavaRpcProviderImpl(@NotNull String baseURL) throws EosioJavaRpcProv
* @throws EosioJavaRpcProviderInitializerError thrown if the base URL passed in is null.
*/
public EosioJavaRpcProviderImpl(@NotNull String baseURL, boolean enableDebug) throws EosioJavaRpcProviderInitializerError {
this(baseURL, enableDebug, Level.BODY);
}

/**
* Construct a new RPC provider instance given the base URL to use for building requests.
* @param baseURL Base URL to use for building requests.
* @param enableDebug Enable Network Log
* @param level Enable Network Log at level
* @throws EosioJavaRpcProviderInitializerError thrown if the base URL passed in is null.
*/
public EosioJavaRpcProviderImpl(@NotNull String baseURL, boolean enableDebug, Level level) throws EosioJavaRpcProviderInitializerError {
if(baseURL == null || baseURL.isEmpty()) {
throw new EosioJavaRpcProviderInitializerError(EosioJavaRpcErrorConstants.RPC_PROVIDER_BASE_URL_EMPTY);
}
Expand All @@ -86,7 +97,7 @@ public EosioJavaRpcProviderImpl(@NotNull String baseURL, boolean enableDebug) th
OkHttpClient.Builder httpClient = new OkHttpClient.Builder();
if (enableDebug) {
HttpLoggingInterceptor httpLoggingInterceptor = new HttpLoggingInterceptor();
httpLoggingInterceptor.setLevel(Level.BODY);
httpLoggingInterceptor.setLevel(level);
httpClient.addInterceptor(httpLoggingInterceptor);
}

Expand Down