首页 > 其他 > 详细

HearthBuddy 日志模块

时间:2019-08-18 12:44:30      阅读:92      评论:0      收藏:0      [点我收藏+]

 

// Triton.Common.LogUtilities.CustomLogger
// Token: 0x0600177C RID: 6012 RVA: 0x000D3F1C File Offset: 0x000D211C
public void AddWpfListener(ScrollViewer scrollViewer, RichTextBox rtbLog)
{
    PatternLayout patternLayout = new PatternLayout("%message");
    this.wpfRtfAppender_0 = new WpfRtfAppender(scrollViewer, rtbLog)
    {
        Layout = patternLayout
    };
    LevelRangeFilter levelRangeFilter = new LevelRangeFilter();
    levelRangeFilter.LevelMin = this.level_0;
    levelRangeFilter.LevelMax = this.level_1;
    this.wpfRtfAppender_0.AddFilter(levelRangeFilter);
    patternLayout.ActivateOptions();
    this.wpfRtfAppender_0.ActivateOptions();
    AsyncAppender asyncAppender = new AsyncAppender();
    asyncAppender.AddAppender(this.wpfRtfAppender_0);
    asyncAppender.ActivateOptions();
    ((Hierarchy)LogManager.GetRepository(this.string_0)).Root.AddAppender(asyncAppender);
}

 

HearthBuddy 日志模块

原文:https://www.cnblogs.com/chucklu/p/11372019.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!