Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-258

Please add ability to dynamically set User and other Event Viewer properties using the Thread Contex or another means.

    XMLWordPrintableJSON

Details

    Description

      I am using the Event Log appender and need to be able to dynamically set the event properties for each message.
      Currently I am using the following:
      Event Viewer Property How I set it up
      Date appender "conversionPattern" node value as %d (w/ "layout" node type = "log4net.Layout.PatternLayout")
      Source appender "applicationName" node value * Would be nice if this could be set dynamically too...
      Type set based on type of log
      Computer picked up automatically
      Event ID Needed 2 things: 1. appender "conversionPattern" node value as%property

      {EventID}

      2. Set thread context property before call to write log, example: log4net.ThreadContext.Properties["EventID"] = 9999;
      Category * HELP!
      User * HELP!

      • These are the ones I cannot find a way to set, I have scoured the internet for examples, I would be thrilled (THRILLED) if these values could be set like the EventID is set.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mpankiw@gmail.com Mary M Pankiw
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified