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. C# Error Using EventViewer [modified]

C# Error Using EventViewer [modified]

Scheduled Pinned Locked Moved C#
csharphelpquestion
2 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.
  • T Offline
    T Offline
    Thaer Hamael
    wrote on last edited by
    #1

    Hi All I use C#.Net To Create Windows Application system I want to save the problems resulting from the system in the Right Click On My Computer-> Manage -> Event Viewer -> Application Error How can I do this Thanks :rose:

    Thaer

    modified on Sunday, June 7, 2009 8:15 AM

    M 1 Reply Last reply
    0
    • T Thaer Hamael

      Hi All I use C#.Net To Create Windows Application system I want to save the problems resulting from the system in the Right Click On My Computer-> Manage -> Event Viewer -> Application Error How can I do this Thanks :rose:

      Thaer

      modified on Sunday, June 7, 2009 8:15 AM

      M Offline
      M Offline
      Moreno Airoldi
      wrote on last edited by
      #2

      using System.Diagnostics;

      EventLog ApplicationEventLog = new System.Diagnostics.EventLog();
      ApplicationEventLog.Source = "My application name here";
      ApplicationEventLog.WriteEntry("My message here", EventLogEntryType.Error);

      You should have a look at the docs for EventLog, you will see you can specify many more options. :)

      2+2=5 for very large amounts of 2 (always loved that one hehe!)

      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