[jira] [Commented] (LOG4NET-562) LogicalThreadContext is not per Thread
[ https://issues.apache.org/jira/browse/LOG4NET-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15957243#comment-15957243 ] Thomas Clegg commented on LOG4NET-562: -- Can you provide the version of .NET you are using? Also VS 16? > LogicalThreadContext is not per Thread > -- > > Key: LOG4NET-562 > URL: https://issues.apache.org/jira/browse/LOG4NET-562 > Project: Log4net > Issue Type: Bug > Components: Other >Affects Versions: 2.0.8 > Environment: Windows 10. VS 16. >Reporter: Husain Alshehhi > > LogicalThreadContext values are spread to many threads when they shouldn't. > This is an example: > {code:title=console.cs|borderStyle=solid} > LogicalThreadContext.Properties["x-corralation-Id"] = > "original-value"; > var list = new List {1, 2, 3, 4, 5, 6, 7, 8, 9, 0}; > Parallel.ForEach(list, (i) => > { > if (i == 3) > LogicalThreadContext.Properties["x-corralation-Id"] = > "modified-value"; > logger.Info($"thread {i}."); > }); > {code} > this is the result > {code:title=badresult.txt|borderStyle=solid} > {"timestamp":"2017-04-05T12:31:41.117Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 1.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.132Z", "level":"INFO", "x-corralation-Id" : > "modified-value", "logger":"logger", "message":"thread 3.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.273Z", "level":"INFO", "x-corralation-Id" : > "modified-value", "logger":"logger", "message":"thread 4.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.273Z", "level":"INFO", "x-corralation-Id" : > "modified-value", "logger":"logger", "message":"thread 6.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.274Z", "level":"INFO", "x-corralation-Id" : > "modified-value", "logger":"logger", "message":"thread 8.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.274Z", "level":"INFO", "x-corralation-Id" : > "modified-value", "logger":"logger", "message":"thread 0.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.219Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 7.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.179Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 5.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.273Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 2.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.234Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 9.", "data":(null)} > {code} > This is what I was expecting: > {code:title=goodresult.txt|borderStyle=solid} > {"timestamp":"2017-04-05T12:31:41.117Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 1.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.132Z", "level":"INFO", "x-corralation-Id" : > "modified-value", "logger":"logger", "message":"thread 3.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.273Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 4.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.273Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 6.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.274Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 8.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.274Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 0.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.219Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 7.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.179Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 5.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.273Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 2.", "data":(null)} > {"timestamp":"2017-04-05T12:31:41.234Z", "level":"INFO", "x-corralation-Id" : > "original-value", "logger":"logger", "message":"thread 9.", "data":(null)} > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (LOG4NET-555) RollingFileAppenderTests fail when run on Linux
[ https://issues.apache.org/jira/browse/LOG4NET-555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15891596#comment-15891596 ] Thomas Clegg commented on LOG4NET-555: -- Only issue is https://github.com/apache/log4net/blob/c7a4d15/tests/src/Appender/RollingFileAppenderTest.cs#L1570 perhaps similar to the noted Mono 2.4 issue. I plan to look into what the ramifications might be before adding it to the #if so as to ignore it. If anyone can provide insight in to what the implication this assert failing might be it would be much appreciated. > RollingFileAppenderTests fail when run on Linux > --- > > Key: LOG4NET-555 > URL: https://issues.apache.org/jira/browse/LOG4NET-555 > Project: Log4net > Issue Type: Bug >Affects Versions: 2.0.6, 2.0.7 > Environment: CentOS 7 >Reporter: Thomas Clegg > Labels: netstandard > > While testing the fix for LOG4NET-554 I ran all tests on both Windows and > CentOS, all tests passed on Windows however some RollingFileAppender tests > failed when tested on Linux: TestExclusiveLockLocks, > TestInterProcessLockFails (all others passed). -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (LOG4NET-555) RollingFileAppenderTests fail when run on Linux
[ https://issues.apache.org/jira/browse/LOG4NET-555?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Clegg updated LOG4NET-555: - Description: While testing the fix for LOG4NET-554 I ran all tests on both Windows and CentOS, all tests passed on Windows however some RollingFileAppender tests failed when tested on Linux: TestExclusiveLockLocks, TestInterProcessLockFails (all others passed). (was: While testing the fix for LOG4NET-554 I ran all tests on both Windows and CentOS, all tests passed on Windows however the RollingFileAppender tests failed when tested on Linux (all others passed).) > RollingFileAppenderTests fail when run on Linux > --- > > Key: LOG4NET-555 > URL: https://issues.apache.org/jira/browse/LOG4NET-555 > Project: Log4net > Issue Type: Bug >Affects Versions: 2.0.6, 2.0.7 > Environment: CentOS 7 >Reporter: Thomas Clegg > Labels: netstandard > > While testing the fix for LOG4NET-554 I ran all tests on both Windows and > CentOS, all tests passed on Windows however some RollingFileAppender tests > failed when tested on Linux: TestExclusiveLockLocks, > TestInterProcessLockFails (all others passed). -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (LOG4NET-555) RollingFileAppenderTests fail when run on Linux
[ https://issues.apache.org/jira/browse/LOG4NET-555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15886560#comment-15886560 ] Thomas Clegg commented on LOG4NET-555: -- I might look into this as time allows, I have yet to find a good way to get test failure reason and details when running on Linux. Hoping when netstandard2.0 gets released next week it makes debugging easier. > RollingFileAppenderTests fail when run on Linux > --- > > Key: LOG4NET-555 > URL: https://issues.apache.org/jira/browse/LOG4NET-555 > Project: Log4net > Issue Type: Bug >Affects Versions: 2.0.6, 2.0.7 > Environment: CentOS 7 >Reporter: Thomas Clegg > Labels: netstandard > > While testing the fix for LOG4NET-554 I ran all tests on both Windows and > CentOS, all tests passed on Windows however the RollingFileAppender tests > failed when tested on Linux (all others passed). -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (LOG4NET-555) RollingFileAppenderTests fail when run on Linux
Thomas Clegg created LOG4NET-555: Summary: RollingFileAppenderTests fail when run on Linux Key: LOG4NET-555 URL: https://issues.apache.org/jira/browse/LOG4NET-555 Project: Log4net Issue Type: Bug Affects Versions: 2.0.7, 2.0.6 Environment: CentOS 7 Reporter: Thomas Clegg While testing the fix for LOG4NET-554 I ran all tests on both Windows and CentOS, all tests passed on Windows however the RollingFileAppender tests failed when tested on Linux (all others passed). -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (LOG4NET-554) LogicalThreadContext was removed in .NETStandard
[ https://issues.apache.org/jira/browse/LOG4NET-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15872154#comment-15872154 ] Thomas Clegg commented on LOG4NET-554: -- My team's use case is highly dependent on this functionality and as such we obviously don't want to lose it. The same functionality should be available via AsyncLocal which is supported in .NET 4.6 and above. I'm actively working on a patch to get things working again. > LogicalThreadContext was removed in .NETStandard > > > Key: LOG4NET-554 > URL: https://issues.apache.org/jira/browse/LOG4NET-554 > Project: Log4net > Issue Type: Bug > Components: Builds >Affects Versions: 2.0.6, 2.0.7 > Environment: .NETStandard1.3 >Reporter: Thomas Clegg > Original Estimate: 504h > Remaining Estimate: 504h > > LogicalThreadContext was excluded from dotnetcore version due to > System.Runtime.Remoting.Messaging no longer being available going forward. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (LOG4NET-554) LogicalThreadContext was removed in .NETStandard
Thomas Clegg created LOG4NET-554: Summary: LogicalThreadContext was removed in .NETStandard Key: LOG4NET-554 URL: https://issues.apache.org/jira/browse/LOG4NET-554 Project: Log4net Issue Type: Bug Components: Builds Affects Versions: 2.0.7, 2.0.6 Environment: .NETStandard1.3 Reporter: Thomas Clegg LogicalThreadContext was excluded from dotnetcore version due to System.Runtime.Remoting.Messaging no longer being available going forward. -- This message was sent by Atlassian JIRA (v6.3.15#6346)