Isline Framework Series Nine--exceptionprocessprovider anomaly frame (upper)

Source: Internet
Author: User
Tags config stack trace system log oracle database

Take the above

IsLine.ExceptionProcess.ExceptionProcessProvider namespaces:

System logs and system exceptions are recorded separately, ILFW system logs and exceptions are processed to improve system flexibility and security. Exceptionprocessprovider is the main component that an application needs to interact with, and it is used to produce an exception message, the resulting exception message is not directly displayed, and it is not output until the layout is formatted.

Overview:

The exception module attached to the IsLine.AppLog.AppLogProvider part, while the exception module design as a special system log to treat, so use the exception module first to configure the Applog module, the specific method see Aicken related articles.

After configuring the log module, you need to introduce namespaces:

Using IsLine.ExceptionProcess.ExceptionProcessProvider;

and use the "Add" tab in Web.config to add a exception pointer:

<add key= "IsLine.ExceptionProcess.Configuration.RenderName" value= "Oracleusingsprender"/>

The function of this pointer is to tell the exception module to use the renderer, the name of the renderer is value, the module load, will automatically load the Isline.applog namespace under the "Renderer initialization" module, after the initialization of the renderer, The specific exception object will be loaded.

This configuration process is described as follows, if we need to put the exception information into the Oracle database, later found that the exception is not so important, just a text file can be written, then we need to modify the Web.config file.

1. Add the following nodes between <configSections></configSections>

Code

<sectionGroup name="IsLine.AppLog.Configuration">
       <section name="FileRender" type="IsLine.Data.Configuration.SuitConfig"/>
       <section name="OracleUsingSPRender" type="IsLine.Data.Configuration.SuitConfig"/>
</sectionGroup>

2. Add the following nodes between </configSections><appSettings>

Code

<isline.applog.configuration>
<filerender>
<appenderstyle>file</appender Style>
<appendertype>text</appendertype>
<appenderinf>islinelog/log4net1.txt< ;/appenderinf>
<AppenderContent>-&gt; Event Date: @eventDate;-&gt; Level: @level;-&gt; Message: @exception;-&gt; Source: @source;-&gt; Stack Trace: @StackTrace-&gt; Trigger: @trigger;-&gt; Memo: @message </appendercontent>
<layoutinf></layoutinf>
<level>debug</lev El>
</filerender>
<oracleusingsprender>
<appenderstyle>oracle</append Erstyle>
<appendertype>storedprocedure</appendertype>
<appenderinf>isline.data. Configuration.oracleconnectstring</appenderinf>
<appendercontent>sp_add_ilfwlog. Add_ilfwlog</appendercontent>
<layoutinf> </layoutinf>
<level>debug</level>
</oracleusingsprender>
</IsLine.AppL og. Configuration>

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.