modifying columns in the logging database

May 18, 2007 at 2:15 PM
I am tasked with enhancing and existing n-tier C-Sharp application.
IT Dept would like writeLog to capture user information in addition to what is already captured
The writelog function looks like this:

using System;
using System.Diagnostics;
using Microsoft.Practices.EnterpriseLibrary.Logging;
using System.Configuration;

namespace EDM.Logging
{
public class Util
{
// public static void WriteLog(int priority, string message, string category, TraceEventType tet, string usercontext)
public static void WriteLog(int priority, string message, string category, TraceEventType tet)
{
bool LoggingEnabled = bool.Parse(ConfigurationManager.AppSettings"LoggingEnabled");

if (LoggingEnabled)
{
LogEntry log = new LogEntry();
log.Message = message;
log.Categories.Add(category);
log.Severity = tet;
log.Title = "EDM Error Log";
log.AppDomainName = "EDM.Logging";
log.TimeStamp = DateTime.Now;
log.Priority = priority;

Logger.Write(log);
}
}
}
}

and is of course a wrapper to the logging libray WRITE function in Microsoft.Practices.EnterpriseLibrary.Logging.
Since to my knowledge I can't change the WRITE function and probably wouldn't want to. How can I pass the user information to the database?
May 25, 2007 at 11:38 PM
This forum is for CodePlex web site issues and discussion only. Please re-post your question to the appropriate project's forum.

Thanks!