In my SpringBoot app I use CommonsRequestLoggingFilter to log all my incomming requests and it works fine :
CommonsRequestLoggingFilter filter = new CommonsRequestLoggingFilter() {
@Override
protected boolean shouldLog(HttpServletRequest request) {
}
@Override
protected void beforeRequest(HttpServletRequest request, String message) {
}
@Override
protected void afterRequest(HttpServletRequest request, String message) {
this.logger.debug(message);
}
};
But to make debugging easier in a Kibana environnement, i would to like to append several information to the core log. At other places in my code I use StructuredArguments like this and it works fine :
this.logger.debug(message, keyValue("foo","bar"));
But inside CommonsRequestLoggingFilter the logger used is org.apache.commons.logging.Log, that is not letting me add any parameter to my log.
Is there any way to override the logger used in CommonsRequestLoggingFilter ? Or other ideas ?
Thanks a lot