CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks Tags:
Item Type: Date Entered: 7/4/2007 3:06:06 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
2.00
XPoints: N/A Replies: 1 Views: 436 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
"dotNetNewbie"
NewsGroup User
ExceptionPolicy HandleException7/4/2007 3:06:06 PM

0

Hi,

I've started using Entreprise library and when i use the exception handle app blocks the log file is not created.

 
What i want is to have several log files for different components (DAL Components, UI Components, etc) and for that i've created policy's.

 I have the following in the web.config file.

 

<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

<loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="" logWarningsWhenNoCategoriesMatch="true">
<listeners>
<add fileName="Geral.log" header="----------------------------------------" footer="----------------------------------------" formatter="Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="FlatFile TraceListener" />

<add fileName="HelperWatch.log" rollSizeKB="0" timeStampPattern="yyyy-MM-dd" rollFileExistsBehavior="Increment" rollInterval="Day" formatter="Text Formatter" header="----------------------------------------" footer="----------------------------------------" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="Helper Components Trace Listener" />

<add fileName="ErrosDAL.log" rollSizeKB="0" timeStampPattern="yyyy-MM-dd" rollFileExistsBehavior="Increment" rollInterval="Day" formatter="Text Formatter" header="----------------------------------------" footer="----------------------------------------" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="DAL Trace Listener" />
</listeners>

<formatters>
<add template="Timestamp: {timestamp}

Message: {message}

Category: {category}

Priority: {priority}

EventId: {eventid}

Severity: {severity}

Title:{title}

Machine: {machine}

Application Domain: {appDomain}

Process Id: {processId}

Process Name: {processName}

Win32 Thread Id: {win32ThreadId}

Thread Name: {threadName}

Extended Properties: {dictionary({key} - {value})}"
type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="Text Formatter" />
</formatters>

<categorySources>
<add switchValue="All" name="DALComponents">
<listeners>
<add name="DAL Trace Listener" />
</listeners>
</add>
<add switchValue="All" name="Helpers" />
</categorySources>
<specialSources>
<allEvents switchValue="All" name="All Events" />
<notProcessed switchValue="All" name="Unprocessed Category" />
<errors switchValue="All" name="Logging Errors & Warnings">
<listeners>
<add name="FlatFile TraceListener" />
</listeners>
</errors>
</specialSources>
</loggingConfiguration>

<exceptionHandling>
<exceptionPolicies>
<add name="DALException">
<exceptionTypes>
<add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="NotifyRethrow" name="Exception">
<exceptionHandlers>
<add logCategory="DALComponents" eventId="100" severity="Error" title="DAL Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" priority="0" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" name="Logging Handler" />
</exceptionHandlers>
</add>
</exceptionTypes>
</add>
<add name="UIException" />
<add name="GeneralException" />
</exceptionPolicies>

</exceptionHandling>

  Can you help me with this one?

Best regards,

Manuel
 


Manuel
"xyz143" <>
NewsGroup User
RollingFlatFileTraceListener9/4/2007 10:26:33 AM

0

How can we restrict the number of files which are created automatically when we use the rollFileExistsBehavior="Increment" option in Enterprise Library 3.1. I need to have only 10 files. When the file number exceeds 10 it should go and overwrite in the oldest file. Can anyone help me in this?

2 Items, 1 Pages 1 |< << Go >> >|


Free Download:













webparts and localization problems in remote server

web part coding help

webparts and toolspart

vs 2005 beta 2 webparts walkthrough - dropdown display not working

webpart manager problem???

webpart manger err ..!

how to apply styles to the verbs menu

about webpart and web zone

cannot set profile properties in web.config

webparts with ajax

web parts duplicating on refresh

web parts down menu arrow not being displayed

strange personalization question

personalization per account for anonnymous viewers

how to config the environment for a webpart?

customise webpartzone and use standard personalisation provider

custom webpartzone properties reinitializing

user controls

programmatically adding webparts to the webpart manager

setting profile properties programmatically

databound marquee problem please help.

web parts (making them both shared and by user (sort of!)

personalization by anonymous profile authentication ?

modules into compiled webparts

webpart instance in page_load

building a (very basic) wysiwyg editor with webparts

why the .aspx did not get the class in the webparts project?

bad form?

2 websites sharing code and certain pages: what is the best approach?

managing webparts events on client side

sharpoint / asp.net 2.0 webparts

a pleasant webparts

problem with asp.net 2.0 table profile provider

difficulty displaying verbs. how many ways can i say help

how to pass variables or parameters from web part to web site

unable to add selected web part

editorpart error when minimized

problem with togglescope and url rewriting

custom web part controls

can web parts developed in vs2005 deployed as individual dll files? how?

moving the webparts from left or right webpartzone without dragging and dropping

help! solutionfile gone

setting title in webpart

webparts - with magicajax

dropdownlist and dynamic web part

how to create portlet without using sharepoint

newbie q: best practices for webpart exception management

peronalizable properties suddenly gets reset!!!

populating asp:dropdownlist webpartmanager

can i drag the values between two web parts

   
  Privacy | Contact Us
All Times Are GMT