Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Transferring Application Log to a file

Transferring Application Log to a file

Scheduled Pinned Locked Moved C#
helpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    engsrini
    wrote on last edited by
    #1

    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

    E J 2 Replies Last reply
    0
    • E engsrini

      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

      E Offline
      E Offline
      engsrini
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • E engsrini

        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

        J Offline
        J Offline
        jasonpb
        wrote on last edited by
        #3

        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

        E 1 Reply Last reply
        0
        • J jasonpb

          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

          E Offline
          E Offline
          engsrini
          wrote on last edited by
          #4

          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..

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups