How to log into a new folder in event log?

Topics: Logging Application Block
Oct 28, 2009 at 1:27 PM

HI,

 

I'm using EL4.1 for exception handling and logging. Currently my application logs the exceptions into the application folder in the event viewer. I would like the exceptions from my application to be logged in a new folder "XYZ" in the event viewer. I tried addinga new folder "XYZ" and gave the same as log name but it doesnt seem to work.

 

Thanks in advance

Soorya

Oct 28, 2009 at 1:42 PM

Are you talking about this - http://support.microsoft.com/kb/315417?  If yes, it's not something that can be configured in EntLib.

 

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

Oct 28, 2009 at 1:47 PM

Hi Sarah,

I wasnt talking about the location of the event log file.

In the event viewer i see various log files (For eg: Application, Security, System etc).

What i want to do is, i want to create such a new log file dedicated to my application and i want all the exceptions to be logged to this file.

In other words, currently all the logs are being logged in the "Application" flog file in the eventviewer. How can i configure entlib to log into the security log file or any other file.

Oct 28, 2009 at 1:56 PM

I see, you're talking about the event Log.  You're still using the Enterprise Library Logging as the Source right?  It doesn't log because the Enterprise Library Logging source is registered in the Application log.  You can either change the Source property (make sure that it exists) or register the Enterprise Library Logging source in your new log.

 

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

Oct 28, 2009 at 3:42 PM

Currently the "Source" property is set as "Enterprise Library Logging" by default.

 

Oct 29, 2009 at 4:20 AM
Edited Oct 29, 2009 at 4:21 AM

Hi,

The quickest way that I can think of is to, specify your custom event log in the "Log" property, then specify a new source in your "Source" property. If the Log and Source does not exist, ent lib will create it for you automatically. See if this is a option for you.

Related Thread: http://entlib.codeplex.com/Thread/View.aspx?ThreadId=71774

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com