issue #20524: don't log huge query
issue #20524: print start of long query