[web] restore query logging functionality (closes #3972561) [applied]