Transferring Application Log to a file
-
-
I have used the eventlogger to log the events in system's application log. what is the path for that file, is it possible to specify the path for application log. how could i do auto/manual archieve on the application log please help.. Regards, Srini
I thing ... the path is specified in the registry File=%SystemRoot%\system32\config\AppEvent.Evt but i want to store log file in a specified path without touching registry (ie without registry class in c#) but still iam struggling:sigh: with how to archieve the application log (i.e copying the file to normal text file)?? Regards, Srini
-
I have used the eventlogger to log the events in system's application log. what is the path for that file, is it possible to specify the path for application log. how could i do auto/manual archieve on the application log please help.. Regards, Srini
For example.. lets say you wanted to back up the System event log.. C:\WINDOWS\system32\config\SysEvent.Evt Good luck trying to read it though, the evt files are encoded Then there is C:\WINDOWS\system32\config\System.Log But you probably wont be able to open because Windows will have a tight grip on it. My suggestion is this... Open up your server explorer in Visual Studio and find the log you want to use. Click and drag that log over to your form or component. It will have an event that gets fired whenever something writes to it, and will send that message to that event. So you could start achiving that way, or you could just periodically read the logs. -Jason
-
For example.. lets say you wanted to back up the System event log.. C:\WINDOWS\system32\config\SysEvent.Evt Good luck trying to read it though, the evt files are encoded Then there is C:\WINDOWS\system32\config\System.Log But you probably wont be able to open because Windows will have a tight grip on it. My suggestion is this... Open up your server explorer in Visual Studio and find the log you want to use. Click and drag that log over to your form or component. It will have an event that gets fired whenever something writes to it, and will send that message to that event. So you could start achiving that way, or you could just periodically read the logs. -Jason
Thanks jasonpb, Yah ur correct it is provide some events like eventLog1.EntryWritten But unfortunately it doesn't help me to programatically archive the event log data . ie it doesn't have method like to store the event log data into some other file. i thing we have to look for some win32 API to that is it correct?? i.e i have a menu Log -> Archive Event log if the user press the above menu i have to store the event log file content to some other text file..