سؤال

I have an NLog config file with several async targets (<targets async="true">). One of the targets is a log file.

I know that NLOG is thread-safe, but does it guarantee that messages coming from the same thread are written to the log file in the order in which they were produced?

هل كانت مفيدة؟

المحلول

I asked the same question on the NLog forum, and got a replay from Kim Christensen, that this is indeed the case:

Yes logs written from the same thread should be written in the order produced.

Thanks Kim!

نصائح أخرى

You can follow This question which has some explaination about thread safety.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top