Add tests for stats#log