record warn and error count on logger