erlang-lager / lager

A logging framework for Erlang/OTP
Apache License 2.0
1.13k stars 455 forks source link

How about extracting file writing to a process? #572

Open rufusvisaber opened 2 years ago

rufusvisaber commented 2 years ago

Recently I had a problem, message_queue_len reached 20000+, which is the number of business processes. Then I found out. The different file_backend is writting different file in one lager_event process. Can it be optimized to separate different processes to write files? Considering the problem of throttle, We can switch asyn or syn by the mailbox size of the write process. I was able to understand the importance of sync_notice, so I was wondering if I could optimize processing speed in this way. Can you please give me some advice?