Common Infrastructure Libraries for .NET(1)-------Common.Logging Framework

由于Quartz.net用到了Common.Logging组件作为日志的实现方式,有必要学习下。
官方网址:http://netcommon.sourceforge.net/index.html
官方文档: http://netcommon.sourceforge.net/docs/2.1.0/reference/html/index.html

 
目前比较著名的一些日志模块有:log4net, Enterprise Library Logging, NLog
Common.Logging在抽象层面上担任了适配器的角色,官网有句话:
Common.Logging library introduces a simple abstraction to allow you to select a specific logging implementation at runtime. Thus you can defer the decision what particular logging library to use until deployment. Adapters are used for plugging a particular logging system into Common.Logging.
由于Common Logging是一个日志的基础设施接口,因此更换到其他日志框架,也不需要修改程序代码.

使用方法
1.引用通用接口的Common.Logging.dll
2.然后根据需要引用具体实现的日志模块(log4net, Enterprise Library Logging, NLog),Common.Logging.XXX.dll,起到适配器的作用
3.最后引用XXX.dll

转载于:https://www.cnblogs.com/cqcmdwym/archive/2012/08/28/2660024.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值