• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
多莱特~梦未醒,再出发

行路难,行路难,多歧路,今安在。

长风破浪会有时,直挂云帆济沧海。

博客园    首页    新随笔       管理     

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.

posted @ 2009-11-19 16:45  Young跑跑  阅读(846)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3