package com.wavefront.agent;

import org.jboss.resteasy.resteasy_jaxrs.i18n.LogMessages;

import java.io.IOException;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.ext.WriterInterceptor;
import javax.ws.rs.ext.WriterInterceptorContext;

/**
 * This RESTEasy interceptor allows disabling GZIP compression even for methods annotated with @GZIP by removing the
 * Content-Encoding header.
 * RESTEasy always adds "Content-Encoding: gzip" header when it encounters @GZIP annotation, but if the request body
 * is actually sent uncompressed, it violates section 3.1.2.2 of RFC7231.
 *
 * Created by vasily@wavefront.com on 6/9/17.
 */
public class DisableGZIPEncodingInterceptor implements WriterInterceptor {
    public DisableGZIPEncodingInterceptor() {
    }

    public void aroundWriteTo(WriterInterceptorContext context) throws IOException, WebApplicationException {
      LogMessages.LOGGER.debugf("Interceptor : %s,  Method : aroundWriteTo", this.getClass().getName());
      Object encoding = context.getHeaders().getFirst("Content-Encoding");
      if(encoding != null && encoding.toString().equalsIgnoreCase("gzip")) {
        context.getHeaders().remove("Content-Encoding");
      }
      context.proceed();
    }
  }
  
@@ -34,87 +34,60 @@
 ort 
-org.jboss.resteasy.resteasy_jaxrs.i18n.LogMessages;%0A%0Aimport java.io.IOException
+java.io.IOException;%0Aimport java.util.logging.Logger
 ;%0A%0Ai
@@ -691,16 +691,129 @@
 tor %7B%0A  
+private static final Logger logger = Logger.getLogger(DisableGZIPEncodingInterceptor.class.getCanonicalName());%0A%0A
   public
@@ -852,17 +852,13 @@
 ) %7B%0A
-  
   %7D%0A%0A
-  
   pu
@@ -969,111 +969,97 @@
     
-  LogMessages.LOGGER.debugf(%22Interceptor : %25s,  Method : aroundWriteTo%22, this.getClass().getName()
+logger.fine(%22Interceptor : %22 + this.getClass().getName() + %22,  Method : aroundWriteTo%22
 );%0A
-  
     
@@ -1131,16 +1131,15 @@
 %22);%0A
-  
     if
+ 
 (enc
@@ -1205,26 +1205,24 @@
 %22)) %7B%0A      
-  
 context.getH
@@ -1262,22 +1262,18 @@
 %22);%0A    
-  %7D%0A  
+%7D%0A
     cont
@@ -1291,16 +1291,10 @@
 ();%0A
-    %7D%0A
   %7D%0A
-  
+%7D%0A

Use proxy logger + fix formatting