Use Query.getQuery in logging plugin.
Merge pull request #203 from greboid/tidying2

Use Query.getQuery in logging plugin.