﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-张子工作室-最新评论</title><link>http://www.cnblogs.com/agtaimaer/CommentsRSS.aspx</link><description>张子工作室</description><language>zh-cn</language><pubDate>Mon, 11 Apr 2011 07:35:26 GMT</pubDate><lastBuildDate>Mon, 11 Apr 2011 07:35:26 GMT</lastBuildDate><generator>cnblogs</generator><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2009/03/12/1334300.html#1475139</link><dc:creator>yezilsora</dc:creator><author>yezilsora</author><pubDate>Thu, 12 Mar 2009 08:11:11 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2009/03/12/1334300.html#1475139</guid><description><![CDATA[我按照搂主的步骤写了如下代码，web环境下为何不能出日志呢。<br/>①log4net.config<br/>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt; <br/>&lt;configuration&gt; <br/><br/>	&lt;configSections&gt; <br/>		&lt;section name=&quot;log4net&quot; <br/>			type=&quot;log4net.Config.Log4NetConfigurationSectionHandler,log4net-net-1.0&quot; <br/>		/&gt; <br/>	&lt;/configSections&gt; <br/>	<br/>	&lt;appender name=&quot;RollingLogFileAppender&quot; type=&quot;log4net.Appender.RollingFileAppender&quot;&gt;<br/>		&lt;file value=&quot;log\log.txt&quot;/&gt;<br/>		&lt;appendToFile value=&quot;true&quot;/&gt;<br/>		&lt;DatePattern value=&quot;yyyyMMdd &amp;quot;.txt&amp;quot;&quot;&gt;&lt;/DatePattern&gt;<br/>		&lt;maxSizeRollBackups value=&quot;1MB&quot;/&gt;<br/>		&lt;maximumFileSize value=&quot;20&quot;/&gt;<br/>		&lt;param name=&quot;StaticLogFileName&quot; value=&quot;false&quot; /&gt;<br/>		&lt;param name=&quot;RollingStyle&quot; value=&quot;Composite&quot; /&gt;<br/>		&lt;layout type=&quot;log4net.Layout.PatternLayout&quot;&gt;<br/>			&lt;param name=&quot;ConversionPattern&quot; value=&quot;%d [%r] [%t] %-5p %c  - %m%n%n&quot; /&gt;<br/>		&lt;/layout&gt;<br/>	&lt;/appender&gt;<br/>	<br/>	&lt;root&gt;<br/>		&lt;level value=&quot;ALL&quot;/&gt;<br/>		&lt;appender-ref ref=&quot;RollingLogFileAppender&quot;/&gt;<br/>	&lt;/root&gt;<br/><br/>&lt;/configuration&gt;<br/><br/>②assemblyInfo.cs<br/>[assembly: log4net.Config.XmlConfigurator(ConfigFile=&quot;log4net.config&quot;, Watch = true)]<br/><br/>③WebForm1.aspx.cs<br/>private void Page_Load(object sender, System.EventArgs e)<br/>{<br/>	log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);<br/>  	log.Error(&quot;error&quot;, new Exception(&quot;hello world!&quot;));<br/>}<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">yezilsora</a> 2009-03-12 16:11 <a href="http://www.cnblogs.com/agtaimaer/archive/2009/03/12/1334300.html#1475139#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2009/02/10/1334300.html#1447531</link><dc:creator>高</dc:creator><author>高</author><pubDate>Tue, 10 Feb 2009 08:02:44 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2009/02/10/1334300.html#1447531</guid><description><![CDATA[@张子<br/><br/>谢谢，终于配置成功，不过，还有个问题，log4net存取日志是异步的吗？<br/><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">高</a> 2009-02-10 16:02 <a href="http://www.cnblogs.com/agtaimaer/archive/2009/02/10/1334300.html#1447531#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2009/02/07/1334300.html#1445351</link><dc:creator>张子</dc:creator><author>张子</author><pubDate>Sat, 07 Feb 2009 05:40:51 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2009/02/07/1334300.html#1445351</guid><description><![CDATA[高：<br/>这句加了吗？<br/>如果是网站：<br/><br/>       在global.asax里面新增配置<br/><br/>       void Application_Start(object sender, EventArgs e) <br/><br/>           {<br/><br/>               // 在应用程序启动时运行的代码<br/><br/>               log4net.Config.XmlConfigurator.Configure();<br/><br/>           }<br/><br/>    如果是web项目和winform项目或者控制台项目：<br/><br/>    要在AssemblyInfo.cs 新增<br/><br/>    [assembly: log4net.Config.XmlConfigurator(ConfigFile = &quot;log4net.config&quot;, Watch = true)]  <br/><br/>    或者：[assembly: log4net.Config.XmlConfigurator()]  （把log4net的配置配置在web的配置文件时）<br/><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">张子</a> 2009-02-07 13:40 <a href="http://www.cnblogs.com/agtaimaer/archive/2009/02/07/1334300.html#1445351#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2009/02/06/1334300.html#1444214</link><dc:creator>高</dc:creator><author>高</author><pubDate>Fri, 06 Feb 2009 02:01:15 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2009/02/06/1334300.html#1444214</guid><description><![CDATA[@lisw<br/>那向oracle9i里写入日志配置应该差不多吧，怎么向oracle里写入日志呢？我的连接串是：<br/>&lt;connectionType value=&quot;System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=2.0.50727.3053, Culture=neutral, PublicKeyToken=b77a5c561934e089&quot; /&gt;<br/>      &lt;connectionString value=&quot;data source=192.145.2.132;User ID=dbtest;Password=dbtest&quot; /&gt;<br/><br/>不知道哪有问题，老记录不了日志，我已经按照<a href="http://logging.apache.org/log4net/release/config-examples.html中的提示创建了日志表" target="_new" rel="nofollow">http://logging.apache.org/log4net/release/config-examples.html中的提示创建了日志表</a>，配置只有上面这几项不同。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">高</a> 2009-02-06 10:01 <a href="http://www.cnblogs.com/agtaimaer/archive/2009/02/06/1334300.html#1444214#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2009/02/06/1334300.html#1444018</link><dc:creator>lisw</dc:creator><author>lisw</author><pubDate>Thu, 05 Feb 2009 23:58:44 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2009/02/06/1334300.html#1444018</guid><description><![CDATA[这个我倒没研究过，不过个人认为日志数据库应该独立与系统数据库，因此连接字符串暴露应该没有问题；<br/><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">lisw</a> 2009-02-06 07:58 <a href="http://www.cnblogs.com/agtaimaer/archive/2009/02/06/1334300.html#1444018#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2009/02/05/1334300.html#1443545</link><dc:creator>高</dc:creator><author>高</author><pubDate>Thu, 05 Feb 2009 06:43:37 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2009/02/05/1334300.html#1443545</guid><description><![CDATA[@lisw<br/>谢谢，原来是我创建的日志表有问题。可是，我还想问个问题，就是能不能将配置中的数据库连接字符串信息和插入日志表的SQL语句写在程序代码里？如果可以的话，怎么应该怎么写？<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">高</a> 2009-02-05 14:43 <a href="http://www.cnblogs.com/agtaimaer/archive/2009/02/05/1334300.html#1443545#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2009/02/05/1334300.html#1443284</link><dc:creator>lisw</dc:creator><author>lisw</author><pubDate>Thu, 05 Feb 2009 03:35:55 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2009/02/05/1334300.html#1443284</guid><description><![CDATA[log4net是封装了异常的，可以自己编一个debug跟进去看一下；一般是配置问题<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">lisw</a> 2009-02-05 11:35 <a href="http://www.cnblogs.com/agtaimaer/archive/2009/02/05/1334300.html#1443284#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2009/02/05/1334300.html#1443238</link><dc:creator>高</dc:creator><author>高</author><pubDate>Thu, 05 Feb 2009 03:03:48 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2009/02/05/1334300.html#1443238</guid><description><![CDATA[我怎么下载demo运行后，仍然不能写入sqlsever数据库呢？而且也没有报异常错误。<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">高</a> 2009-02-05 11:03 <a href="http://www.cnblogs.com/agtaimaer/archive/2009/02/05/1334300.html#1443238#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 上海马拉松归来</title><link>http://www.cnblogs.com/agtaimaer/archive/2008/12/06/1344234.html#1392912</link><dc:creator>轩之语泪</dc:creator><author>轩之语泪</author><pubDate>Sat, 06 Dec 2008 02:48:25 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2008/12/06/1344234.html#1392912</guid><description><![CDATA[不错，鼓励一下，我只参加了健康跑<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">轩之语泪</a> 2008-12-06 10:48 <a href="http://www.cnblogs.com/agtaimaer/archive/2008/12/06/1344234.html#1392912#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2008/11/17/1334300.html#1372095</link><dc:creator>lisw</dc:creator><author>lisw</author><pubDate>Mon, 17 Nov 2008 01:37:17 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2008/11/17/1334300.html#1372095</guid><description><![CDATA[.net 3.5没有大得变化，log4net 应该可以直接支持<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">lisw</a> 2008-11-17 09:37 <a href="http://www.cnblogs.com/agtaimaer/archive/2008/11/17/1334300.html#1372095#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2008/11/16/1334300.html#1371565</link><dc:creator>张子</dc:creator><author>张子</author><pubDate>Sun, 16 Nov 2008 03:05:29 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2008/11/16/1334300.html#1371565</guid><description><![CDATA[demo 文件地址：<br/><a href="http://files.cnblogs.com/agtaimaer/Log4netDemo.rar" target="_new">http://files.cnblogs.com/agtaimaer/Log4netDemo.rar</a><br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">张子</a> 2008-11-16 11:05 <a href="http://www.cnblogs.com/agtaimaer/archive/2008/11/16/1334300.html#1371565#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2008/11/16/1334300.html#1371549</link><dc:creator>daconglee</dc:creator><author>daconglee</author><pubDate>Sun, 16 Nov 2008 02:18:14 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2008/11/16/1334300.html#1371549</guid><description><![CDATA[有.net3.5的版本没有<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">daconglee</a> 2008-11-16 10:18 <a href="http://www.cnblogs.com/agtaimaer/archive/2008/11/16/1334300.html#1371549#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: Log4net学习笔记</title><link>http://www.cnblogs.com/agtaimaer/archive/2008/11/15/1334300.html#1371369</link><dc:creator>aspnetx</dc:creator><author>aspnetx</author><pubDate>Sat, 15 Nov 2008 14:39:49 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2008/11/15/1334300.html#1371369</guid><description><![CDATA[园子里也有朋友喜欢网球啊,不错不错.<br/>其是昨天那场真是精彩.多交流啊.<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">aspnetx</a> 2008-11-15 22:39 <a href="http://www.cnblogs.com/agtaimaer/archive/2008/11/15/1334300.html#1371369#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 这个准备都两年了一没有行动 </title><link>http://www.cnblogs.com/agtaimaer/archive/2008/10/12/1308828.html#1338163</link><dc:creator>丁学</dc:creator><author>丁学</author><pubDate>Sun, 12 Oct 2008 00:11:37 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2008/10/12/1308828.html#1338163</guid><description><![CDATA[歡迎來到博客園<br/>博主在讀什么書？<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">丁学</a> 2008-10-12 08:11 <a href="http://www.cnblogs.com/agtaimaer/archive/2008/10/12/1308828.html#1338163#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>re: 这个准备都两年了一没有行动 </title><link>http://www.cnblogs.com/agtaimaer/archive/2008/10/11/1308828.html#1338083</link><dc:creator>真见</dc:creator><author>真见</author><pubDate>Sat, 11 Oct 2008 15:39:54 GMT</pubDate><guid>http://www.cnblogs.com/agtaimaer/archive/2008/10/11/1308828.html#1338083</guid><description><![CDATA[..<br><br><div align=right><a style="text-decoration:none;" href="http://www.cnblogs.com/agtaimaer/" target="_blank">真见</a> 2008-10-11 23:39 <a href="http://www.cnblogs.com/agtaimaer/archive/2008/10/11/1308828.html#1338083#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>
