Click here to Skip to main content
15,797,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends ,

My client has using Microsoft.Practices.EnterpriseLibrary.Logging dll for write Log. I don't know why? Can u anyone explain about the feature of Microsoft.Practices.EnterpriseLibrary.Logging Compare to normal logging using EventLog.

It's my client code for using enter log.
public void LogData(string strMessage, TraceEventType enmEventType)
    LogEntry objLog = new LogEntry();
    objLog.Message = strMessage;
    objLog.Severity = enmEventType;

public void CreateMyLog()
    if (!EventLog.SourceExists("SourceName"))
        EventLog.CreateEventSource("SourceName", "SourceName");

And also this code was not working in my environment It's throw a error when execute the following line
I had use google but no answer found for me. Can anyone help me. Your help is much appreciate.

Thanks for Advance.
Vedat Ozan Oner 15-Feb-14 12:38pm    
you can look at this page:

there is a good example at the end of the page. and please read it all documentation, I think you can find the solution for that exception.

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