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. Looking for HELPFUL information on my event log issues

Looking for HELPFUL information on my event log issues

Scheduled Pinned Locked Moved C#
help
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.
  • L Offline
    L Offline
    LongRange Shooter
    wrote on last edited by
    #1

    I have three threads that are trying to write events to a single event log -- with each thread being a separate source. Each thread creates an instance of the EventLog and uses eventLog.WriteLine() to post the event. In initialization each thread checks to see if its' source name is registered to the log. If it not, it registers itself. Then each thread creates an instance of the eventlog passing the logname and source name, after which a success message is posted to the EventLog. The first thread establishes itself and its' events are getting logged without problems, but the other two threads are not getting their events written. Any help would be appreciated.

    D 1 Reply Last reply
    0
    • L LongRange Shooter

      I have three threads that are trying to write events to a single event log -- with each thread being a separate source. Each thread creates an instance of the EventLog and uses eventLog.WriteLine() to post the event. In initialization each thread checks to see if its' source name is registered to the log. If it not, it registers itself. Then each thread creates an instance of the eventlog passing the logname and source name, after which a success message is posted to the EventLog. The first thread establishes itself and its' events are getting logged without problems, but the other two threads are not getting their events written. Any help would be appreciated.

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      At what point is it failing? 1.

      LongRange.Shooter wrote:

      each thread checks to see if its' source name is registered to the log

      LongRange.Shooter wrote:

      If it not, it registers itself

      LongRange.Shooter wrote:

      a success message is posted to the EventLog

      LongRange.Shooter wrote:

      thread creates an instance of the eventlog passing the logname and source name

      Working through the above list should help solve your problem. You obviously have it coded correctly in the first thread - have you tried altering/controlling the order of these threads to check if the code is functional in the other two - i.e make the second tread do it's stuff first? Just seen the thread below! It looks like you might have found the root of the problem. :)

      Dave

      modified on Wednesday, May 7, 2008 3:03 PM

      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