Plugin for request logging

Hi All,
I am wondering whether its feasible to write a plugin to log elasticsearch requests. I looked at several plugins, but they only add new rest endpoints. Is it possible to write a plugin that "intercepts" rest requests and log them? Please advice.

Thanks,
Madhav.

You'd have to hook into the netty server to intercept requests but I don't know how feasible that is.

However you can get this with Shield via auditing, or you can wrap a proxy (nginx/apache) in front and do it that way.

if you use http you could always use packetbeat to capture the requests. But be careful of recursion