add configurable logLimit to limit size of logged params, optimize logging