added log query (pagination)