C-sharp program writes log file log (frequently called), is it necessary to deal with it concurrently?

when I recently wrote web api, I wrote a log manager with the ability to read and write program logs. The log is written to the .txt file, in which the procedure function is written. I don"t know if I want to do concurrent processing? Function calls are frequent. I"d like to ask

Jan.08,2022

how do you write it? Is it hard written in filestream?
can turn on read write share, but log may write in a mess.

use nlog here.


it's nice to use Log4Net directly, it's easy and reliable.

Menu