Enterprise 5.0 logging block not logging in release mode.

Topics: Logging Application Block
Sep 14, 2010 at 7:32 PM

I have been trying to use the Enterprise Library 5.0 Logging block and it works fine when I am building in Debug mode (VS2010). I am logging to a rolling text file. When I built in Release mode it does not write to the file. I decided to try out Microsoft's 'EnoughPI' lab that comes with the 'Enterprise Library 5.0 - Hands On Labs' install and found that I could not log to the flat file in Release mode as well.  My OS is Windows 7 Ultimate.

Any ideas on why it works in debug mode and not release mode? Thanks.

Sep 15, 2010 at 1:45 AM

Hi,

Unfortunately after trying to reproduce using the HOL it works fine for me. Are you sure you're looking in the right directory? For Debug - bin\Debug folder while for Release - bin\Release folder.

Gino Terrado
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

Sep 24, 2010 at 1:19 AM

Hi,

I am also facing same problem, i am able to log the errors to the database in debug mode but when i turn it to release mode it is not able to log the error in the db .

Any know wht is the problem with new Enterprise lIbraray 5.0 Logging blocks

Any help .. really appreciated

 

Thank You

Malik Khan

Sep 24, 2010 at 1:32 AM

Try configuring a flat file or event log trace listener under Logging Errors and Warnings.  If any trace listener fails, a log is writen by the tracelistener(s) configured under that section.  Check the log written after trying to log to the database.

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com