开发者

Reliable(durable) distributed logging engine

开发者 https://www.devze.com 2022-12-13 03:20 出处:网络
Trying to find a commercial logging framework for distributed systems. This framework must allow .NET applications on a Remote Server to log messages which can then be collected in a Central开发者_运维

Trying to find a commercial logging framework for distributed systems. This framework must allow .NET applications on a Remote Server to log messages which can then be collected in a Central开发者_运维技巧 Location. If possible the Central Location should store messages in a SQL Server database.

Requirements:

  1. Be able to initiate the logging of messages on the Remote Server, even when network disruptions prevent immediate dispatching of the message to the Central Location.
  2. Dispatching of messages to the Central Location should be handled by a process other than the one running the .NET application, to prevent any decrease in the performance of ASP.NET applications or web services.
  3. Assured eventual delivery of messages to the Central Location. e.g. In the event of the Remote Server rebooting toward the end of a period when the network is not responsive, logged messages should still be delivered when the Remote Server and normal network conditions are restored.


Probably a really simple solution can be to continue writing local logs and create a separate process for republish the log to a server. You can pubhish log using several options including a publish subscribe message bus like MassTransit, or msmq.

Using a different solution like writing a specific log4net adapter is definitely an option but it may incur in coupling / dependencies problems, so adoption must consider the actual deployement environment.


I think you should be able to do this using Microsoft Enterprise Library and MSMQ out of the box. The Entlib Logging application block has a built in MSMQ listener. While we have used Entlib logging on several projects, I have not personally used the MSMQ distributor service.

http://msdn.microsoft.com/en-us/library/dd203267.aspx


log4net is the choice. It is thread-safe.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号