logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Ingalla (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LOG4NET-433) ThreadContext property not written to log when running on mono
Date Mon, 21 Apr 2014 05:40:15 GMT

     [ https://issues.apache.org/jira/browse/LOG4NET-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dan Ingalla updated LOG4NET-433:
--------------------------------

    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.
{code}
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
{code}

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.

{{monospaced}}
Process ID: _sysprocess_f77318a0
Verify ThreadContext requestId: _sysprocess_f77318a0
04/20/2014 23:34:11 [_sysprocess_f77318a0-1/INFO ] XmlConfiguration: Load configuration from
path
{{monospaced}}

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



  was:
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.
{code}
ThreadContext.Properties["requestId"] = (some short GUID-like Id);
var id = ThreadContext.Properties["requestId"];
Console.WriteLine("Request ID from thread context: {0}", id);
{code}

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.




> ThreadContext property not written to log when running on mono
> --------------------------------------------------------------
>
>                 Key: LOG4NET-433
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-433
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>         Environment: log4net 2.0.3 (Nuget version)
> .Net version 4.0
>            Reporter: Dan Ingalla
>
> 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.
> {code}
> 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
> {code}
> 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.
> {{monospaced}}
> Process ID: _sysprocess_f77318a0
> Verify ThreadContext requestId: _sysprocess_f77318a0
> 04/20/2014 23:34:11 [_sysprocess_f77318a0-1/INFO ] XmlConfiguration: Load configuration
from path
> {{monospaced}}
> This sounds like a Mono issue, but I figured I would report it anyway.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message