Merge pull request #45 from LantaoJin/master

fix the bug that fileRotate() could be invoked more than once
Merge pull request #23 from dianping/master

sync