c# - Log4net RollingFileAppender Timeout -


I am currently logging on to a network share drive using a rolling file adapter.

There has been a problem where hosted hosting of the server still has basic network communication but it failed to complete the files and other file based tasks.

Log4Net hangs while trying to get the log appender for the file on this remote server. Can I use any kind of timeout option?

any timeout or any type of property I saw for the appender And this is not doing anything special (Appendor skeleton with file appenders is a crazy path to see all the stream writing in the actual message layout type).

I have two recommendations ...

Custom Apeender for the rescue!

You can try to write a custom appender that includes all types of protection from the network (like NetworkFileAppender to hear it). But you really have to consider the design. Appenders synchronous in Log4net will be faster.

I see a post written about the login-innet, it's full of precautions and imperfections

shared logging "service"

especially where I came back and did not say to write my own, the notice of that part:

An old post about the log-4 net mailing list ending with this recommendation

I suggest using a shared buffer shared from a single worker thread, which is a buffer Reaches definite size.

This service should be separate from your main application (probably just a background thread). It should include all security from the network, which may include another local file store (unless you are losing messages).

In the .NET 4.0 and below, you could help to get some idea below.

Conclusion (and the REAL RECOMMENDED)

I add a network file store in the first place to your decision on the question you are essentially adding network calls to all your applications (Longest and least guaranteed call possible) Probably it is not worth it to implement any of these "fixes". You need files at the network store and see that another solution can meet your actual needs.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -