How come log lines written by Monolog don't get messed/mixed up when two script instances are writing to log concurrently?

情到浓时终转凉″ 提交于 2019-12-04 17:44:43
Aitch

When I use logging I would expect the underlying components to work correct. It's not any container you have to ensure concurrency access.

I've read, that the main stream operating systems use thread-safe io calls which are also not interruptable and there are non thread safe calls.

You can read here, but in my opinion the marked answer is not correct at all: Is fwrite atomic?

In other words I've never had any broken logs. It's like INSERT in a database. Either there is a row inserted or not.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!