add limit to the number of logs per function
make logs limited globally