Log4net Storage to Oracle Debug Could not load Type [log4net. appender.oracleappender]

Source: Internet
Author: User
Tags oracleconnection log4net
<span id="Label3"></p><p><p>Recently in the Webfrom Oracle call log4net start debugging without data, opened the Log4net own debug function found:</p></p><p><p><br></p></p><p><p>Log4net:logger [root] level set to [name= ' all ', value=-2147483648].</p></p>Log4net:loading Appender [oracleappender] type: [log4net. appender.oracleappender]<br>Log4net:error Could not create Appender [oracleappender] of type [log4net. Appender.oracleappender]. reported error Follows.<br>System.TypeLoadException:Could not load Type [log4net. Appender.oracleappender]. tried assembly [log4net, version=1.2.13.0, culture=neutral, publickeytoken= 669e0ddf0bb1aa2a] and all loaded assemblies<br>In Log4net. Util.SystemInfo.GetTypeFromString (Assembly relativeassembly, String typeName, boolean throwonerror, Boolean IgnoreCase)<br>In Log4net. Util.SystemInfo.GetTypeFromString (String typeName, Boolean throwonerror, boolean IgnoreCase)<br>In Log4net. Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender (XmlElement Appenderelement)<br>Log4net:error Appender named [oracleappender] not found.<br>Log4net:adding Appender named [infoappender] to logger [root].<br><p><p>Log4net:hierarchy Threshold []</p></p><p><p><br></p></p><p><log4net><br><span style="white-space:pre"><span style="white-space:pre"></span></span><!--<appender name= "oracleappender" type= "log4net. Appender.oracleappender ">--> found this sentence to the following sentence is Ok.<br><span style="white-space:pre"><span style="white-space:pre"></span></span><appender name= "adonetappender_oracle" type= "log4net. Appender.adonetappender "><br><span style="white-space:pre"><span style="white-space:pre"></span></span><buffersize value= "1"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><br><span style="white-space:pre"><span style="white-space:pre"></span></span><br><span style="white-space:pre"><span style="white-space:pre"></span></span><!--<connectiontype value= "Oracle.DataAccess.Client.OracleConnection, oracle.dataaccess, version= 2.0.50727.3053, culture=neutral, publickeytoken=b77a5c561934e089 "/>--><br><span style="white-space:pre"><span style="white-space:pre"></span></span><!--<connectiontype value= "Oracle.DataAccess.Client.OracleConnection, System.Data.OracleClient, version= 2.0.50727.3053, culture=neutral, publickeytoken=b77a5c561934e089 "/>--><br><span style="white-space:pre"><span style="white-space:pre"></span></span><connectiontype value= "System.Data.OracleClient.OracleConnection, System.Data.OracleClient"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><connectiontype value= "System.Data.OracleClient.OracleConnection, System.Data.OracleClient"/><br><br><br><span style="white-space:pre"><span style="white-space:pre"></span></span><connectionstring value= "DATA source=orcl; USER id=beforvipreset; Password=beforvipreset "/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><commandtext value= "INSERT into Beforvipreset. Yhj_log4net (log_id, log_date, log_level, log_identity, log_message, log_exception, log_logger, LOG_SOURCE) VALUES (YHJ_ Log4net_seq.nextval,: log_date,: log_level,: log_identity,: log_message,: log_exception,: logger,: source) "/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parametername value= ": log_date"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><dbtype value= "DateTime"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><layout type= "log4net. Layout.rawtimestamplayout "><br><span style="white-space:pre"><span style="white-space:pre"></span></span><conversionpattern value= "%d{yyyy/mm/dd HH:mm:ss}"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span></layout><br><span style="white-space:pre"><span style="white-space:pre"></span></span></parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parametername value= ": log_level"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><dbtype value= "String"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><size value= "ten"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><layout type= "log4net. Layout.patternlayout "><br><span style="white-space:pre"><span style="white-space:pre"></span></span><conversionpattern value= "%level"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span></layout><br><span style="white-space:pre"><span style="white-space:pre"></span></span></parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parametername value= ": log_identity"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><dbtype value= "String"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><size value= "/>"<br><span style="white-space:pre"><span style="white-space:pre"></span></span><layout type= "log4net. Layout.patternlayout "><br><span style="white-space:pre"><span style="white-space:pre"></span></span><conversionpattern value= "%identity"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span></layout><br><span style="white-space:pre"><span style="white-space:pre"></span></span></parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parametername value= ": log_message"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><dbtype value= "String"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><size value= "4000"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><layout type= "log4net. Layout.patternlayout "><br><span style="white-space:pre"><span style="white-space:pre"></span></span><conversionpattern value= "%m"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span></layout><br><span style="white-space:pre"><span style="white-space:pre"></span></span></parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parametername value= ": log_exception"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><dbtype value= "String"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><size value= "4000"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><layout type= "log4net. Layout.patternlayout "><br><span style="white-space:pre"><span style="white-space:pre"></span></span><conversionpattern value= "%exception"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span></layout><br><span style="white-space:pre"><span style="white-space:pre"></span></span></parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parametername value= ": logger"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><dbtype value= "String"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><size value= "255"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><layout type= "log4net. Layout.patternlayout "><br><span style="white-space:pre"><span style="white-space:pre"></span></span><conversionpattern value= "%logger"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span></layout><br><span style="white-space:pre"><span style="white-space:pre"></span></span></parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span><parametername value= ": source"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><dbtype value= "String"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span><size value= "/>"<br><span style="white-space:pre"><span style="white-space:pre"></span></span><layout type= "log4net. Layout.patternlayout "><br><span style="white-space:pre"><span style="white-space:pre"></span></span><conversionpattern value= "%file:%line"/><br><span style="white-space:pre"><span style="white-space:pre"></span></span></layout><br><span style="white-space:pre"><span style="white-space:pre"></span></span></parameter><br><span style="white-space:pre"><span style="white-space:pre"></span></span></appender><br></p><p><p><br></p></p><p><p>where log4net only Adonetappender and not oracleappender, unless you define. If you customize, refer to my above should be possible.</p></p> <p style="font-size:12px;"><p style="font-size:12px;">Copyright Notice: This article for Bo Master original article, without Bo Master permission not Reproduced.</p></p> <p><p>Log4net Storage to Oracle Debug Could not load Type [log4net. appender.oracleappender]</p></p></span>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.