惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Securelist
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
V
V2EX
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
The Register - Security
The Register - Security
Recorded Future
Recorded Future
Y
Y Combinator Blog
小众软件
小众软件
Jina AI
Jina AI
V2EX - 技术
V2EX - 技术
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
宝玉的分享
宝玉的分享
The Hacker News
The Hacker News
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
T
Threatpost
博客园 - 聂微东
Scott Helme
Scott Helme
IT之家
IT之家
N
Netflix TechBlog - Medium
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
MongoDB | Blog
MongoDB | Blog
T
Tor Project blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
A
About on SuperTechFans
酷 壳 – CoolShell
酷 壳 – CoolShell
C
CERT Recently Published Vulnerability Notes
P
Palo Alto Networks Blog
Spread Privacy
Spread Privacy
C
Check Point Blog
L
LINUX DO - 最新话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Last Week in AI
Last Week in AI
Attack and Defense Labs
Attack and Defense Labs
T
Tailwind CSS Blog
罗磊的独立博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Webroot Blog
Webroot Blog
Help Net Security
Help Net Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
爱范儿
爱范儿
PCI Perspectives
PCI Perspectives
Security Latest
Security Latest

博客园 - craboYang

JVM: can not create native thread 注解式功能权限控制机制 SqlInXml 动态配置化 ElasticSearch5集群部署指南 Solr5 DataImport 处理1对多关系 C# XMPP客户端与openfire通信(Matrix Xmpp 授权破解教程) 响应式编程 Part.01 (Layout and MVVM) Mono.Ceil 无法保存Silverlight 程序集 Dappers 开发入门 (5) - 缓存 Dappers 开发入门 (4) - 明细编辑 Dappers 开发入门(3)- 列表界面 Dappers 开发入门(2) - Mapping Dappers 开发入门(1) - 接口 Dappers : 基于Dapper.net 扩展的Dao - Part II Dappers : 基于Dapper.net 扩展的Dao B/S页面 通用权限控制(2) B/S页面 通用数据权限控制 由于ContractFilter在EndpointDispatcher不匹配,因此Action为<BtsActionMapping...的消息无法在接收方处理 - craboYang - 博客园 WinForm DataGridView 绑定后仅显示许多空行和空格
基于system.diagnostics Trace的日志输出
craboYang · 2012-05-31 · via 博客园 - craboYang

一直只使用log4net, asp.net 的 page trace。 最近SSO使用CAS发生故障,发现其log未输出到文件, 花了点时间把如下配置加在web.config 才搞定:

注意:Source的Name必须与log全名匹配, 无法同log4net一样以namespace多级自动匹配。

<system.diagnostics>
        <sources>
            <source name="DotNetCasClient.HttpModule" switchValue="All" switchType="System.Diagnostics.SourceSwitch">
                <listeners>
                    <add name="xml"/>
                </listeners>
            </source>
        </sources>
        <sharedListeners>
            <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="c:\temp\Traces.svclog" />
            <add name="console" type="System.Diagnostics.ConsoleTraceListener"/>
        </sharedListeners>
        <trace autoflush="true"/>
    </system.diagnostics>

posted @ 2012-05-31 15:48  craboYang  阅读(3374)  评论()    收藏  举报