Logging Interceptor is deprecated - what to use? #370
-
Hi, Also, LoggingFeature is deprecated too. I don't know If I can use in native mode this extension: Or the best way is to create my own interceptor. Any ideas? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Hi @lferna You should be able to use something like the below with the # For clients
quarkus.cxf.client."fruitservice-client".features=org.apache.cxf.ext.logging.LoggingFeature
# For service endpoints
quarkus.cxf.endpoint."fruitservice".features=org.apache.cxf.ext.logging.LoggingFeature For reference, here is additional documentation on In case you need to set some properties on |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply. In a first approximation, it works in local environment (jvm) but not in graalvm because it doesn't find the class. But I need to investigate further, I will use a method to configure some things and I will come back and give the results. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I created a new issue: #371 to track this. We likely need to make a small change in the extension; please do keep us posted on your findings. |
Beta Was this translation helpful? Give feedback.
-
Luis, I looked into this, but could not find any issue in the extension. Just for reference, you can use something similar to the below (combined with the import io.quarkus.arc.Unremovable;
import io.quarkus.runtime.annotations.RegisterForReflection;
import org.apache.cxf.ext.logging.LoggingFeature;
import javax.enterprise.inject.Produces;
@RegisterForReflection(targets = {LoggingFeature.class})
public class Producers {
@Produces
@Unremovable
LoggingFeature loggingFeature() {
LoggingFeature loggingFeature = new LoggingFeature();
loggingFeature.setPrettyLogging(true);
return loggingFeature;
}
} |
Beta Was this translation helpful? Give feedback.
-
Hi @shumonsharif , |
Beta Was this translation helpful? Give feedback.
Luis, I looked into this, but could not find any issue in the extension. Just for reference, you can use something similar to the below (combined with the
application.properties
updates mentioned earlier) to leveragecxf-rt-features-logging
in native mode.