Click here to Skip to main content
15,901,205 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have web.config file where I have added the Log Listner.and I want to use that log file in my another class which is in another dll.
I can get that path of web.config like
string path=ConfiqurationManager.Appsetting["MyLogFile"];

But How I will use that to write the details of log in a file
like How to use that path in
string path= ConfigurationManager.AppSettings["MyLogFile"].ToString();
LogEntry objlogEntry = new LogEntry();
objlogEntry.Message = errorMsg;
Logger.Write(objlogEntry);
Logger.Write("Error", "Error");
Logger.Write("Hello Message", "None", errorPriority, 01, TraceEventType.Information);
Logger.Write("Crash", "General", errorPriority, 02, TraceEventType.Error);
Logger.Write("Crash", "Error", errorPriority, 01, TraceEventType.Error, methodName);

can any one Tell me how to use path in LogEnry class


Thanks
Fayaz
Posted
Comments
Kiran Susarla 17-Dec-12 2:36am    
Are you using Enterprise Application Blocks logging component or is it your custom Logging class that you have developed on your own?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900