Log4net Repository 模块

一。

       Repository 的意思是储存库,并且根据之前的分析,显然Repository模块 维护着系统中定义的ILogger,以及和Name,Assamble的对应关系,和Appender 的对应关系,那么现在要分析的就是:

    • 如何实现命名实体。
    • 如何支持实体查询。
    • 实体查询是不是就是依赖查询呢?

二。

1.Hierarchy

在使用DefaultRepositorySelector创建ILoggerRepository时默认使用的LoggerRepository为Hierarchy ,

而Hierarchy结构:

Hierarchical organization of loggers

    /// This class is specialized in retrieving loggers by name and
    /// also maintaining the logger hierarchy. Implements the
    /// <see cref="ILoggerRepository"/> interface.
    /// </para>
    /// <para>
    /// The structure of the logger hierarchy is maintained by the
    /// <see cref="GetLogger(string)"/> method. The hierarchy is such that children
    /// link to their parent but parents do not have any references to their
    /// children. Moreover, loggers can be instantiated in any order, in
    /// particular descendant before ancestor.
    /// </para>
    /// <para>
    /// In case a descendant is created before a particular ancestor,
    /// then it creates a provision node for the ancestor and adds itself
    /// to the provision node. Other descendants of the same ancestor add
    /// themselves to the previously created provision node.

2.

 

3.

转载于:https://www.cnblogs.com/zhuispeed/archive/2009/11/19/1606194.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值