Class OkHttpTweakLogInterceptor

  • All Implemented Interfaces:
    okhttp3.Interceptor , pro.fessional.wings.slardar.httprest.okhttp.OkHttpInterceptor

    
    public class OkHttpTweakLogInterceptor
     implements OkHttpInterceptor
                        
    Default mapping of Log-level and data-level
    DEBUG- : BODY
    INFO : BASIC
    WARN+ : NONE
    
    Since:

    2022-11-01

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static HttpLoggingInterceptor.Logger LoggerTrace
      public final static HttpLoggingInterceptor.Logger LoggerDebug
      public final static HttpLoggingInterceptor.Logger LoggerInfo
      public final static HttpLoggingInterceptor.Logger LoggerWarn
      public final static Interceptor.Companion Companion
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void levelMapping(@NotNull() LogLevel lg, @NotNull() HttpLoggingInterceptor.Level ok) Change the mapping to Log-level and data-level, e.g.
      void resetMapping() reset to the default mapping
      Response intercept(@NotNull() Interceptor.Chain chain)
      boolean isNetwork()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OkHttpTweakLogInterceptor

        OkHttpTweakLogInterceptor()
    • Method Detail

      • levelMapping

         void levelMapping(@NotNull() LogLevel lg, @NotNull() HttpLoggingInterceptor.Level ok)

        Change the mapping to Log-level and data-level, e.g. DEBUG - BODY

      • resetMapping

         void resetMapping()

        reset to the default mapping

      • intercept

        @NotNull() Response intercept(@NotNull() Interceptor.Chain chain)