condition AJAX log count on logging enabled