Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds


  Asked By: J    Date: Mar 15    Category: Sharepoint    Views: 1078

I am trying to incorporate log4net in my WebPart to do some logging,
but the problem that I'm having is that the log file is not being
generated. I'm hoping that someone can shed some light on what's wrong.
I downloaded the latest log4net distribution and included the
log4net.dll in my references. I added an App.config file to my
solution where I defined my appender per log4net instructions.

In my code I call the App.config file with:
This should load App.config.

And then write some test text:
logger.Debug("test debug");
logger.Warn("test warn");

I don't get any error messages and my log file is not created.
I am logged in as SP Admin with full Admin rights.



2 Answers Found

Answer #1    Answered By: Tamika Cummings     Answered On: Mar 15

I am looking for recommendations regarding logging  from WebParts in
MOSS 2007. I looked at log4net, but it doesn't seem to be ideally
suited for Sharepoint logging. Are there any other tools that you'd
recommed? I need to use it to log  user actions such as clicking on a
button, etc. Also, I will use it for writing debugging logs.

Answer #2    Answered By: Linsey Bauer     Answered On: Mar 15

For a custom developed WebPart why don't you just log  to a custom
Application Log? Support for that is built right into .net.

Didn't find what you were looking for? Find more on Log4net Or get search suggestion and latest updates.

Related Topics:



Related Post