这个问题产生原因是你自己使用方式引起的 跟其他无关 最后还给了一些建议
The issue is in your usage. This is not in any way related to this repo, so I'm going to close this. This question is actually a good candidate for Stackoverflow. However, here are my couple of improvements you can make to your code: there is no point in locking on a string or any other local variable. Wrap the FileStream and StreamWriter lines with using blocks. Having using block you won't need neither Flush nor Dispose explicitly. These were generic comments. But a higher level one would be: Do not open and close files on every log message - cache the instances and reuse existing handles. That'll reduce the load a lot.