(Cleanup proposal.)
Currently, access log filters are manually evaluated in each implementation. Filters are instantiated and passed to the AccessLog::Instance, and then each AccessLog::Instance's log() implementation has logic of if (filter_ && filter_.evaluate(...)) then log(). Instead, I propose we move that logic up to some sort of public bool evaluate_filter(...) function in the AccessLog interface, and wrap all of Envoy's AccessLog::Instance::log() calls in a conditional.
cc: @ambuc @eziskind @AndresGuedez
(Cleanup proposal.)
Currently, access log filters are manually evaluated in each implementation. Filters are instantiated and passed to the AccessLog::Instance, and then each AccessLog::Instance's
log()implementation has logic ofif (filter_ && filter_.evaluate(...)) then log(). Instead, I propose we move that logic up to some sort of publicbool evaluate_filter(...)function in the AccessLog interface, and wrap all of Envoy's AccessLog::Instance::log() calls in a conditional.cc: @ambuc @eziskind @AndresGuedez