@Test public void testGetRetrofitLogLevel() { assertEquals(HttpLoggingInterceptor.Level.BODY, Sixpack.getRetrofitLogLevel(LogLevel.VERBOSE)); assertEquals(HttpLoggingInterceptor.Level.HEADERS, Sixpack.getRetrofitLogLevel(LogLevel.DEBUG)); assertEquals(HttpLoggingInterceptor.Level.NONE, Sixpack.getRetrofitLogLevel(LogLevel.NONE)); assertEquals(HttpLoggingInterceptor.Level.NONE, Sixpack.getRetrofitLogLevel(null)); }
static HttpLoggingInterceptor.Level getRetrofitLogLevel(final LogLevel logLevel) { if (logLevel == null) { return HttpLoggingInterceptor.Level.NONE; } else if (logLevel == LogLevel.VERBOSE) { return HttpLoggingInterceptor.Level.BODY; } else if (logLevel == LogLevel.DEBUG) { return HttpLoggingInterceptor.Level.HEADERS; } else { return HttpLoggingInterceptor.Level.NONE; } }
Sixpack { static HttpLoggingInterceptor.Level getRetrofitLogLevel(final LogLevel logLevel) { if (logLevel == null) { return HttpLoggingInterceptor.Level.NONE; } else if (logLevel == LogLevel.VERBOSE) { return HttpLoggingInterceptor.Level.BODY; } else if (logLevel == LogLevel.DEBUG) { return HttpLoggingInterceptor.Level.HEADERS; } else { return HttpLoggingInterceptor.Level.NONE; } } }
Sixpack { static HttpLoggingInterceptor.Level getRetrofitLogLevel(final LogLevel logLevel) { if (logLevel == null) { return HttpLoggingInterceptor.Level.NONE; } else if (logLevel == LogLevel.VERBOSE) { return HttpLoggingInterceptor.Level.BODY; } else if (logLevel == LogLevel.DEBUG) { return HttpLoggingInterceptor.Level.HEADERS; } else { return HttpLoggingInterceptor.Level.NONE; } } Sixpack(final HttpUrl sixpackUrl, final String clientId, final OkHttpClient client);   Sixpack(final SixpackApi api);   Sixpack(final SixpackApi api, final String clientId); }
Sixpack { static HttpLoggingInterceptor.Level getRetrofitLogLevel(final LogLevel logLevel) { if (logLevel == null) { return HttpLoggingInterceptor.Level.NONE; } else if (logLevel == LogLevel.VERBOSE) { return HttpLoggingInterceptor.Level.BODY; } else if (logLevel == LogLevel.DEBUG) { return HttpLoggingInterceptor.Level.HEADERS; } else { return HttpLoggingInterceptor.Level.NONE; } } Sixpack(final HttpUrl sixpackUrl, final String clientId, final OkHttpClient client);   Sixpack(final SixpackApi api);   Sixpack(final SixpackApi api, final String clientId); ExperimentBuilder experiment(); String getClientId(); void setLogLevel(LogLevel logLevel); LogLevel getLogLevel(); void setLogger(final Logger logger); static String generateRandomClientId(); }
Sixpack { static HttpLoggingInterceptor.Level getRetrofitLogLevel(final LogLevel logLevel) { if (logLevel == null) { return HttpLoggingInterceptor.Level.NONE; } else if (logLevel == LogLevel.VERBOSE) { return HttpLoggingInterceptor.Level.BODY; } else if (logLevel == LogLevel.DEBUG) { return HttpLoggingInterceptor.Level.HEADERS; } else { return HttpLoggingInterceptor.Level.NONE; } } Sixpack(final HttpUrl sixpackUrl, final String clientId, final OkHttpClient client);   Sixpack(final SixpackApi api);   Sixpack(final SixpackApi api, final String clientId); ExperimentBuilder experiment(); String getClientId(); void setLogLevel(LogLevel logLevel); LogLevel getLogLevel(); void setLogger(final Logger logger); static String generateRandomClientId(); static final HttpUrl DEFAULT_URL; static final String NAME_REGEX; static final Pattern NAME_PATTERN; static final LogLevel DEFAULT_LOG_LEVEL; static final String SIXPACK_LOG_TAG; }