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

ThreadContext property not written to log when running on mono

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Appenders
    • None
    • log4net 2.0.3 (Nuget version)
      .Net version 4.0

    Description

      When running the assembly under Mono, a thread context property displays as 'null' in the log entries. This does not occur on when running on the MS CLR.

      I verified the property is getting set via direct console output.

      E.g.

      ThreadContext.Properties["requestId"] = "_system_process";
      var id = ThreadContext.Properties["requestId"];
      Console.WriteLine("Request ID from thread context: {0}", id);
      // Outputs: Request ID from thread context: _system_process
      

      Now on both MS .Net and Mono the console output verifies that the thread context value is being set, but only while running under the MS CLR does the request Id value get written to any logs. In Mono, the output is null.

      This sounds like a Mono issue, but I figured I would report it anyway.

      Attachments

        Activity

          People

            Unassigned Unassigned
            daningalla Dan Ingalla
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: