[Proposal] Add getQueryLogState()

In response to [#3600]