You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by chlowell <gi...@git.apache.org> on 2015/10/30 00:10:39 UTC

[GitHub] log4net pull request: [WIP] Initial .NET Core support

GitHub user chlowell opened a pull request:

    https://github.com/apache/log4net/pull/16

    [WIP] Initial .NET Core support

    This creates a new solution with a Portable Class Library project to build log4net for .NET Core platforms. The project requires Visual Studio 2015 and Universal Windows App Development Tools 1.1.
    
    In keeping with the existing codebase, the new project defines compilation constant `NETCORE`, which I use to make (mostly small) API substitutions and exclude unsupported code. The three most important exclusions in my mind are
     * Configuration via XML (the existing classes would require large changes)
     * Stack frame logging (`System.Diagnostics.StackTrace` isn't fully implemented for Core)
     * Per-assembly logging (neither `Assembly.GetCallingAssembly` nor an effective workaround is available)
    
    I'd appreciate all feedback on the direction I've taken, and any insight into what's most important to the library's consumers is very helpful to me. Thanks!

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/chlowell/log4net log4net-core-pcl

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/log4net/pull/16.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #16
    
----
commit d34156aa6daf17c929e7b0afb6846ae92f5bf3b6
Author: Charles Lowell <ch...@microsoft.com>
Date:   2015-10-23T23:46:30Z

    Add GitHub .gitignore for Visual Studio

commit 6027686afab2a618ef3b0c8558ba5b6e2f40ea39
Author: Charles Lowell <ch...@microsoft.com>
Date:   2015-10-23T23:06:20Z

    Initial Core support for log4net
    
     * Add log4net.core.sln and log4net.pcl.csproj, a PCL targeting .NET 4.6 & ASP.NET Core 5
       * PCL requires Visual Studio 2015 with Universal Windows App Development Tools 1.1
       * PCL defines NETCORE when building
     * Add NETCORE directives to code

commit 2d9dcd5408bfcc1adda68142532b4d729be49c22
Author: Charles Lowell <ch...@microsoft.com>
Date:   2015-10-27T17:08:05Z

    Add test project to log4net.core.sln
    
     * Excludes tests not expected ever to pass for NETCORE
     * Failing tests which may pass as APIs come to Core are commented

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @chlowell maybe you can help us with two questions.
    
    Why did you chose netstandard1.3 as target and not, say, netstandard1.6. .NET Core 1.0 should provide the later AFAIU.
    
    Why did you chose the version 3.0.0? To me it looks as if 2.1 would be fine if we wanted to unify the versions of the nuget package and the assemblies.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by SeanSnyders <gi...@git.apache.org>.
Github user SeanSnyders commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @bodewig Yeah, I'm also trying to get my head around .Net Core project setup. Things have been quite a bit in flux!
    
    I think one will need to spec the dependencies, no? I could have it by the tail, though....
    I'll try the other build you linked to as well.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Fixed the build breakage and feedback in #30.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: [WIP] (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    so far there haven't been any concrete plans beyond this PR


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by iby-dev <gi...@git.apache.org>.
Github user iby-dev commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Hi, do you guys have a release date for the new package? 2.0.6?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Yes, that seems to be expected as `src/Util/PatternStringConverters/EnvironmentFolderPathPatternConverter` is among the excludes in https://github.com/apache/log4net/blob/trunk/netstandard/log4net/project.json#L32
    
    We really need to document what is known to not work with .NET Core.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by stuartd <gi...@git.apache.org>.
Github user stuartd commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    [ToUpperInvariant](http://stackoverflow.com/questions/2801508/what-is-wrong-with-tolowerinvariant) is preferable



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on a diff in the pull request:

    https://github.com/apache/log4net/pull/16#discussion_r70600785
  
    --- Diff: tests/src/Utils.cs ---
    @@ -105,7 +114,28 @@ private static Type[] GetTypesArray(object[] args)
             internal static void RemovePropertyFromAllContexts() {
                 GlobalContext.Properties.Remove(PROPERTY_KEY);
                 ThreadContext.Properties.Remove(PROPERTY_KEY);
    +#if !(NETCF || NETSTANDARD1_3)
                 LogicalThreadContext.Properties.Remove(PROPERTY_KEY);
    +#endif
             }
    -	}
    +
    +        // Wrappers because repository/logger retrieval APIs require an Assembly argument on NETSTANDARD1_3
    +        internal static ILog GetLogger(string name)
    +        {
    +#if NETSTANDARD1_3
    +            return LogManager.GetLogger(typeof(Utils).GetTypeInfo().Assembly, name);
    +#else
    +			return LogManager.GetLogger(name);
    +#endif
    +        }
    +
    +        internal static ILoggerRepository GetRepository()
    +        {
    +#if NETSTANDARD1_3
    +            return LogManager.GetRepository(typeof(Utils).GetTypeInfo().Assembly);
    +#else
    +			return LogManager.GetRepository();
    +#endif
    --- End diff --
    
    nit: indentation of either one of two return statements is off


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on a diff in the pull request:

    https://github.com/apache/log4net/pull/16#discussion_r73228215
  
    --- Diff: netstandard/log4net/project.json ---
    @@ -0,0 +1,94 @@
    +\ufeff{
    +  "name": "log4net",
    +  "version": "3.0.0",
    +  "frameworks": {
    +    "netstandard1.3": {
    +      "buildOptions": {
    +        "compile": {
    +          "include": [ "*.cs", "../../src/**/*.cs" ],
    +          "exclude": [
    +            "../../src/Appender/AdoNetAppender.cs",
    +            "../../src/Appender/AspNetTraceAppender.cs",
    +            "../../src/Appender/ColoredConsoleAppender.cs",
    +            "../../src/Appender/EventLogAppender.cs",
    +            "../../src/Appender/NetSendAppender.cs",
    +            "../../src/Appender/RemotingAppender.cs",
    +            "../../src/Appender/SmtpAppender.cs",
    +            "../../src/LogicalThreadContext.cs",
    +            "../../src/Config/DOMConfigurator.cs",
    +            "../../src/Config/DOMConfiguratorAttribute.cs",
    +            "../../src/Config/Log4NetConfigurationSectionHandler.cs",
    +            "../../src/Layout/Pattern/AspNetCachePatternConverter.cs",
    +            "../../src/Layout/Pattern/AspNetContextPatternConverter.cs",
    +            "../../src/Layout/Pattern/AspNetPatternConverter.cs",
    +            "../../src/Layout/Pattern/AspNetRequestPatternConverter.cs",
    +            "../../src/Layout/Pattern/AspNetSessionPatternConverter.cs",
    +            "../../src/Layout/Pattern/StackTraceDetailPatternConverter.cs",
    +            "../../src/Layout/Pattern/StackTracePatternConverter.cs",
    +            "../../src/Plugin/RemoteLoggingServerPlugin.cs",
    +            "../../src/Util/PatternStringConverters/EnvironmentFolderPathPatternConverter.cs",
    +            "../../src/Util/LogicalThreadContextProperties.cs",
    +            "../../src/Util/LogicalThreadContextStacks.cs",
    +            "../../src/Util/NativeError.cs",
    +            "../../src/Util/WindowsSecurityContext.cs"
    +          ]
    +        },
    +        "define": [ "HAS_READERWRITERLOCKSLIM", "NETSTANDARD1_3" ]
    --- End diff --
    
    `NETSTANDARD1_3` definition is redundant here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by chlowell <gi...@git.apache.org>.
Github user chlowell commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Targeting `netstandard1.6` here is more limiting than useful. Doing so would remove support for current UWP apps, and the larger API surface won't light up any major features.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by NachbarsLumpi <gi...@git.apache.org>.
Github user NachbarsLumpi commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    So that means that the log4net assembly targeting .net core has the same capabilities like the one targeting the .net framework 4.6 and differs only in the fact that it targets .net core with netstandard1.3?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on a diff in the pull request:

    https://github.com/apache/log4net/pull/16#discussion_r70601024
  
    --- Diff: src/Util/ReadOnlyPropertiesDictionary.cs ---
    @@ -215,8 +216,13 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte
     				string entryKey = entry.Key as string;
     				object entryValue = entry.Value;
     
    -				// If value is serializable then we add it to the list
    -				if (entryKey != null && entryValue != null && entryValue.GetType().IsSerializable)
    +                // If value is serializable then we add it to the list
    +#if NETSTANDARD1_3
    +			    bool isSerializable = entryValue.GetType().GetTypeInfo().IsSerializable;
    +#else
    +                bool isSerializable = entryValue.GetType().IsSerializable;
    +#endif
    +                if (entryKey != null && entryValue != null && isSerializable)
     				{
    --- End diff --
    
    nit: indentation under `#if` `#else` and that of `if (entryKey` is off


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @SeanSnyders I've updated the package at https://www.myget.org/feed/log4net-test/package/nuget/log4net (overwritten the original one)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    I've installed the Linux version, this is what happens for me:
    
    ```
    Compiling log4net for .NETStandard,Version=v1.3
    /usr/share/dotnet/dotnet compile-csc @/devel/ASF/log4net/trunk/netstandard/log4net/obj/Debug/netstandard1.3/dotnet-compile.rsp returned Exit Code 1
    /devel/ASF/log4net/trunk/src/Appender/FileAppender.cs(164,33): error CS0115: 'FileAppender.LockingStream.BeginRead(byte[], int, int, AsyncCallback, object)': no suitable method found to override
    /devel/ASF/log4net/trunk/src/Appender/FileAppender.cs(175,33): error CS0115: 'FileAppender.LockingStream.BeginWrite(byte[], int, int, AsyncCallback, object)': no suitable method found to override
    /devel/ASF/log4net/trunk/src/Appender/FileAppender.cs(183,25): error CS0115: 'FileAppender.LockingStream.Close()': no suitable method found to override
    /devel/ASF/log4net/trunk/src/Appender/FileAppender.cs(188,24): error CS0115: 'FileAppender.LockingStream.EndRead(IAsyncResult)': no suitable method found to override
    /devel/ASF/log4net/trunk/src/Appender/FileAppender.cs(193,25): error CS0115: 'FileAppender.LockingStream.EndWrite(IAsyncResult)': no suitable method found to override
    
    Compilation failed.
        0 Warning(s)
        5 Error(s)
    ```
    
    I'll double check whether I've missed some changes to `FileAppender`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by derFunk <gi...@git.apache.org>.
Github user derFunk commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @bodewig sorry for not using the mailing list ;) one last thing: I'd love to test basically right now. I don't have a public NuGet repo at hands, would it be possible for you to push it somewhere? NuGet.org/MyGet.org? I can test with my private repo until then, but it would be more convenient to have it publicly available.
    
    Gr��e aus M�nchen.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by TAGC <gi...@git.apache.org>.
Github user TAGC commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    How far along is the .NET Core migration? I'm planning to migrate one of my projects that currently targets .NET Framework 4.5.2 to .NET Core and one of its dependencies is Log4Net. I only use `ColoredConsoleAppenders` and `RollingFileAppenders` - are these still available in the version targeting .NET Core?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on a diff in the pull request:

    https://github.com/apache/log4net/pull/16#discussion_r70599902
  
    --- Diff: src/Appender/AppenderCollection.cs ---
    @@ -26,7 +26,10 @@ namespace log4net.Appender
     	/// A strongly-typed collection of <see cref="IAppender"/> objects.
     	/// </summary>
     	/// <author>Nicko Cadell</author>
    -	public class AppenderCollection : ICollection, IList, IEnumerable, ICloneable
    +	public class AppenderCollection : ICollection, IList, IEnumerable
    +#if !NETSTANDARD1_3
    +		, ICloneable
    --- End diff --
    
    Note that ICloneable is coming back. https://github.com/dotnet/corefx/pull/9970
    If the new contract doesn't support NETSTANDARD1_3, and we do want to support this TxM, then the best way in the future would be to also add `NETSTANDARD1_<whatever>` in the project.json which exposes IColeable interface on public surface area.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by derFunk <gi...@git.apache.org>.
Github user derFunk commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    AFAIU it seems we could have a NuGet package release already, or at least a pre-release.
    Is there anything else open we can help?
    Unfortunately only the NuGet repo owner can push.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: [WIP] (LOG4NET-467) .NET Core support

Posted by pantonis <gi...@git.apache.org>.
Github user pantonis commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request #16: (LOG4NET-467) .NET Core support

Posted by chlowell <gi...@git.apache.org>.
Github user chlowell commented on a diff in the pull request:

    https://github.com/apache/log4net/pull/16#discussion_r70652017
  
    --- Diff: src/Util/ReadOnlyPropertiesDictionary.cs ---
    @@ -215,8 +216,13 @@ public virtual void GetObjectData(SerializationInfo info, StreamingContext conte
     				string entryKey = entry.Key as string;
     				object entryValue = entry.Value;
     
    -				// If value is serializable then we add it to the list
    -				if (entryKey != null && entryValue != null && entryValue.GetType().IsSerializable)
    +                // If value is serializable then we add it to the list
    +#if NETSTANDARD1_3
    +			    bool isSerializable = entryValue.GetType().GetTypeInfo().IsSerializable;
    +#else
    +                bool isSerializable = entryValue.GetType().IsSerializable;
    +#endif
    +                if (entryKey != null && entryValue != null && isSerializable)
     				{
    --- End diff --
    
    The original code mixes tabs and spaces freely. I tried to remain consistent with that to limit whitespace noise in the diff. I'll normalize the lines you've called out; thanks for the attention to detail.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @jasonwilliams200OK, thanks, but too late, I went off fixing it myself before I saw you comment. :-)
    
    I'll diff my svn tree against a checkout of @chlowell's original branch to verify whether I missed more patch failures. It's pretty strange as I don't recall seeing any "hunk failed" messages.
    
    BTW, this is the test result on Linux (Ubuntu 16.04, but I don't think it matters):
    
    ```
    Errors and Failures
    1) Failed : log4net.Tests.Appender.RollingFileAppenderTest.TestExclusiveLockLocks
      Log contents is not what is expected
      String lengths are both 38. Strings differ at index 0.
      Expected: "This is a message\nThis is a message 2\n"
      But was:  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0This is a message 2\n"
      -----------^
    at log4net.Tests.Appender.RollingFileAppenderTest.AssertFileEquals(String filename, String contents) in /devel/ASF/log4net/trunk/tests/src/Appender/RollingFileAppenderTest.cs:line 1470
    at log4net.Tests.Appender.RollingFileAppenderTest.TestExclusiveLockLocks() in /devel/ASF/log4net/trunk/tests/src/Appender/RollingFileAppenderTest.cs:line 1570
    Run Settings
        WorkDirectory: /devel/ASF/log4net/trunk/netstandard
    Test Run Summary
      Overall result: Failed
      Test Count: 145, Passed: 136, Failed: 1, Inconclusive: 0, Skipped: 8
        Failed Tests - Failures: 1, Errors: 0, Invalid: 0
        Skipped Tests - Ignored: 8, Explicit: 0, Other: 0
      Start time: 2016-08-13 16:05:11Z
        End time: 2016-08-13 16:05:14Z
        Duration: 2,964 seconds
    Results saved as /devel/ASF/log4net/trunk/netstandard/TestResult.xml
    SUMMARY: Total: 1 targets, Passed: 0, Failed: 1.
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request: [WIP] (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the pull request:

    https://github.com/apache/log4net/pull/16#issuecomment-222350005
  
    Please note I'm just one voice others may think differently about this. Given the amount of flux that's going on I'm a bit reluctant to adapt to .NET Core before 1.0 is final.
    
    And once it is, in the light of https://blogs.msdn.microsoft.com/dotnet/2016/05/27/making-it-easier-to-port-to-net-core/ I'm not sure whether it wouldn't be better to wait even a bit longer. The current patch throws out all serialization which will become available in a successor of .NET Core again, maybe the workarounds for `System.Diagnostics.StackTrace` and `Assembly.GetCallingAssembly` won't be needed any longer either.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by chlowell <gi...@git.apache.org>.
Github user chlowell commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    This code has been merged into `trunk`. To my knowledge there's no published package, but you can build one with the dotnet CLI.
    
    `ColoredConsoleAppender` isn't available for .NET Core because it uses Win32 APIs. `RollingFileAppender` is available, with the caveat that its file locking doesn't work on Linux.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on a diff in the pull request:

    https://github.com/apache/log4net/pull/16#discussion_r70600774
  
    --- Diff: tests/src/Utils.cs ---
    @@ -105,7 +114,28 @@ private static Type[] GetTypesArray(object[] args)
             internal static void RemovePropertyFromAllContexts() {
                 GlobalContext.Properties.Remove(PROPERTY_KEY);
                 ThreadContext.Properties.Remove(PROPERTY_KEY);
    +#if !(NETCF || NETSTANDARD1_3)
                 LogicalThreadContext.Properties.Remove(PROPERTY_KEY);
    +#endif
             }
    -	}
    +
    +        // Wrappers because repository/logger retrieval APIs require an Assembly argument on NETSTANDARD1_3
    +        internal static ILog GetLogger(string name)
    +        {
    +#if NETSTANDARD1_3
    +            return LogManager.GetLogger(typeof(Utils).GetTypeInfo().Assembly, name);
    +#else
    +			return LogManager.GetLogger(name);
    +#endif
    --- End diff --
    
    nit: indentation of either one of two return statements is off


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by robcube <gi...@git.apache.org>.
Github user robcube commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Getting a weird error using .net core 1.1:
    ```
    var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
    XmlConfigurator.ConfigureAndWatch(logRepository, new FileInfo("log4net.config.xml"));
    ILog Log = LogManager.GetLogger(typeof(Program));
    Log.Debug("hey!");
    ```
    at last line results in:
    ```
    System.ArgumentException: Invalid name character in 'log4j:event'. The ':' character, hexadecimal value 0x0x3A, cannot be included in a name.
       at System.Xml.XmlWellFormedWriter.CheckNCName(String ncname)
       at System.Xml.XmlWellFormedWriter.WriteStartElement(String prefix, String localName, String ns)
       at log4net.Layout.XmlLayoutSchemaLog4j.FormatXml(XmlWriter writer, LoggingEvent loggingEvent)
       at log4net.Layout.XmlLayoutBase.Format(TextWriter writer, LoggingEvent loggingEvent)
       at log4net.Appender.FileAppender.Append(LoggingEvent loggingEvent)
       at log4net.Appender.AppenderSkeleton.DoAppend(LoggingEvent loggingEvent)
    ```



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on a diff in the pull request:

    https://github.com/apache/log4net/pull/16#discussion_r70601430
  
    --- Diff: src/Util/PatternStringConverters/NewLinePatternConverter.cs ---
    @@ -72,6 +75,16 @@ internal sealed class NewLinePatternConverter : LiteralPatternConverter, IOption
     		/// </remarks>
     		public void ActivateOptions()
     		{
    +#if NETSTANDARD1_3
    +			if (CultureInfo.InvariantCulture.CompareInfo.Compare(Option, "DOS", CompareOptions.IgnoreCase) == 0)
    +			{
    +				Option = "\r\n";
    +			}
    +			else if (CultureInfo.InvariantCulture.CompareInfo.Compare(Option, "UNIX", CompareOptions.IgnoreCase) == 0)
    --- End diff --
    
    Should we just ToLower(), compare with `==` and get rid of the preprocessors for all Compare()-like code?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @derFunk the mailing list comment was meant to say that there may be things going on that one might miss when not following the list. I must admit there isn't that much going on: https://blogs.apache.org/logging/entry/apache_log4net_needs_help
    
    As for packages, I'm sorry, we're not prepared for that. We will be publishing the final release to nuget but the current test build looks like a real release internally, so we can't publish it there. I'd need to make myself familiar with myget first.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by SeanSnyders <gi...@git.apache.org>.
Github user SeanSnyders commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @bodewig I can confirm that the dependencies now seem to be solved, thanks.
    
    But I get that the my log file pattern does not seem to work using the `envFolderPath`
    
    ![image](https://cloud.githubusercontent.com/assets/1384135/20846408/57da2df8-b92e-11e6-9fb9-0e8604494f60.png)
    
    Is that a known issue? Any workarounds etc?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: [WIP] (LOG4NET-467) .NET Core support

Posted by niemyjski <gi...@git.apache.org>.
Github user niemyjski commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    +1 I'm also needing this for our oss projects that depend on log4net. Would be great to get this on the lowest .net standard possible.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by chlowell <gi...@git.apache.org>.
Github user chlowell commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    No, there are significant differences. My first post details some important ones.
    
    .NET Framework 4.6 implements `netstandard1.3`. This means it exposes all the APIs specified by `netstandard1.3` (and below). However, in terms of exposed APIs, `netstandard1.3` is a subset of .NET Framework 4.6. The latter exposes many APIs not specified by the former.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request #16: (LOG4NET-467) .NET Core support

Posted by niemyjski <gi...@git.apache.org>.
Github user niemyjski commented on a diff in the pull request:

    https://github.com/apache/log4net/pull/16#discussion_r70623307
  
    --- Diff: src/Util/PatternStringConverters/NewLinePatternConverter.cs ---
    @@ -72,6 +75,16 @@ internal sealed class NewLinePatternConverter : LiteralPatternConverter, IOption
     		/// </remarks>
     		public void ActivateOptions()
     		{
    +#if NETSTANDARD1_3
    +			if (CultureInfo.InvariantCulture.CompareInfo.Compare(Option, "DOS", CompareOptions.IgnoreCase) == 0)
    +			{
    +				Option = "\r\n";
    +			}
    +			else if (CultureInfo.InvariantCulture.CompareInfo.Compare(Option, "UNIX", CompareOptions.IgnoreCase) == 0)
    --- End diff --
    
    ToLowerInvariant()


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    OK, myget was simpler that I had expected. at least for a one-off publication: https://lists.apache.org/thread.html/ec7f65499d6c82e509a7ab6d51c1d657679beeb9f29bb78806f72d0a@%3Clog4net-dev.logging.apache.org%3E


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by chlowell <gi...@git.apache.org>.
Github user chlowell commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    I updated this branch for .NET Core 1.0 rather than creating a new PR. The branch name is unfortunate--there's no longer a PCL involved--but I hope keeping this open is convenient for those watching.
    
    @arkadiuszwojcik the goal of this PR is to make log4net portable across .NET Core platforms. Implementing those abstractions could be useful, but doing so wouldn't enable consuming log4net on additional platforms.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request #16: (LOG4NET-467) .NET Core support

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/log4net/pull/16


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request: [WIP] (LOG4NET-467) .NET Core support

Posted by StrangeWill <gi...@git.apache.org>.
Github user StrangeWill commented on the pull request:

    https://github.com/apache/log4net/pull/16
  
    @bodewig _Hopefully_ there shouldn't be much flux between RC2 and Final (well at least we were told porting from RC2 -> Final won't be nearly as bad as RC1 -> RC2 was, and it wasn't *that* bad), though I am struggling myself with System.Diagnostics.Stacktrace being gutted on one of my own projects. I can totally understand the hesitation though especially with a project like this.
    
    I'll be keeping my eye out for support for .NET Core on log4net, I'm just not nearly as happy with any of the other solutions.
    
    ---
    
    The other interesting question is whether or not log4net on .NET Core is going to support the new json configuration files or still require XML files out of the box.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    I've spelled out https://github.com/apache/log4net/blob/6e8c0db1407a398fa64d72f89cf6b460ad209808/src/site/xdoc/release/framework-support.xml#L578 which will become visible at http://logging.apache.org/log4net/release/framework-support.html once we cut the release. Also I'll make sure I list those limitations in the release notes and the announcement mail.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by NachbarsLumpi <gi...@git.apache.org>.
Github user NachbarsLumpi commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    I guess that writing xml tags that include a namespace results in the observed exception. Few people use xml layouts for logs, so this might be a regression or an incompatibility that shows itself only with .net core. Would you please create an issue for this so that we can track it better? I encourage you further to investigate in this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by SeanSnyders <gi...@git.apache.org>.
Github user SeanSnyders commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Right, okay.
    Yes a a list of things not working would be great.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by niemyjski <gi...@git.apache.org>.
Github user niemyjski commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    The lower the .net standard you can target the more places it will run. 1.0 can run every where (1.0, 1.6, etc). You should be targeting 1.3 here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by wjdavis5 <gi...@git.apache.org>.
Github user wjdavis5 commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Oh I see, I misread that their chart there. Thanks for clarifying.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Many thanks @SeanSnyders . You are the first one actually given the binaries a try - or the first one who tells us so.
    
    I've built the myget package using .NET Core 1.0.0 (SDK Preview 2), I really hope we don't need to provide assemblies built for different .NET Core 1.x versions.
    
    As for dependencies of the package, I didn't add any for the .NET Core version, maybe I should have. To be honest I'm far from an expert WRT .NET Core.
    
    A preview build of the traditional distributions can be found in http://stefan.samaflost.de/staging/log4net-2.0.6/log4net-2.0.6-bin-newkey.zip - this contains the pdb file.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by NachbarsLumpi <gi...@git.apache.org>.
Github user NachbarsLumpi commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    It is done when it is done. If you need it anytime sooner, get involved.
    
    On 3 Oct 2016 4:22 p.m., "Ibrar Mumtaz" <no...@github.com> wrote:
    
    > Hi, do you guys have a release date for the new package? 2.0.6?
    >
    > \u2014
    > You are receiving this because you commented.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/log4net/pull/16#issuecomment-251118857>, or mute
    > the thread
    > <https://github.com/notifications/unsubscribe-auth/AIID6uKBzeKNLRNv1afKYssvwT7m16FCks5qwQ-ggaJpZM4GYooH>
    > .
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    The [nuspec](https://github.com/apache/log4net/blob/trunk/log4net.nuspec) doesn't list any dependencies, this is because all dependencies of log4net are part of the framework for the Mono and .NET versions.
    
    Re-reading the nuspec schema we probably need to add a dependency `group` with the `targetFramework` set properly.  I'll try to see what the nuspec created with `dotnet pack` looks like.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Thanks a lot @bodewig! I am definitely willing to participate. I will test out the master and try to incorporate the feedback in subsequent PR pronto (before you start cutting the release :stuck_out_tongue_winking_eye:). I have subscribed to log4net-dev mailing list.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    I'm not sure this applies here as we are still creating specific assemblies for .NET 2.0 up to 4.5 - and all of them are superior to the .NET Core DLL as they provide an ADO.NET appender, for example. The assembly built here is only expected to be used for .NET Core. At least that's where I'd have expected it to get used.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by TAGC <gi...@git.apache.org>.
Github user TAGC commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    That's for the info. \U0001f44d 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    I've just diffed chlowell:log4net-core-pcl against my svn working copy of trunk and it looks as if there have been changes after the PR which makes identifying misses more difficult. I'll apply #30 and then we can all go from there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by SeanSnyders <gi...@git.apache.org>.
Github user SeanSnyders commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @bodewig Great, I'll try it again.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by derFunk <gi...@git.apache.org>.
Github user derFunk commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Awesome, thanks.
    
    I shared your cry for help on [Hacker News](https://news.ycombinator.com/item?id=12708507), maybe this gets some traction. Also you should maybe also add log4net here: http://up-for-grabs.net/#/tags/logging.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on a diff in the pull request:

    https://github.com/apache/log4net/pull/16#discussion_r74683879
  
    --- Diff: src/Util/PatternStringConverters/NewLinePatternConverter.cs ---
    @@ -72,6 +75,16 @@ internal sealed class NewLinePatternConverter : LiteralPatternConverter, IOption
     		/// </remarks>
     		public void ActivateOptions()
     		{
    +#if NETSTANDARD1_3
    +			if (CultureInfo.InvariantCulture.CompareInfo.Compare(Option, "DOS", CompareOptions.IgnoreCase) == 0)
    +			{
    +				Option = "\r\n";
    +			}
    +			else if (CultureInfo.InvariantCulture.CompareInfo.Compare(Option, "UNIX", CompareOptions.IgnoreCase) == 0)
    --- End diff --
    
    @chlowell, do you think it's a good idea to instead of dogfooding `string.Compare(strA, strB, InvariantCulture) == 0` pattern with `CultureInfo` comparer, use common denominator `strA.ToUpperInvariant() == strB.ToUpperInvariant()` and remove the preprocessor all over the place as part of this PR? IMO, this will clean up quite a bit. If you want, I can send a PR to your `log4net-core-pcl` branch, then you would just need to update the JIRA patch. :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by wjdavis5 <gi...@git.apache.org>.
Github user wjdavis5 commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Hello, we are very patiently awaiting this next release. Thank you for putting this together.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request: [WIP] (LOG4NET-467) .NET Core support

Posted by chlowell <gi...@git.apache.org>.
Github user chlowell commented on the pull request:

    https://github.com/apache/log4net/pull/16#issuecomment-222199688
  
    I have another branch on my fork (`dotnetcore-rc2`) which builds with RC2 tools, and has some improvements over the code here. A few tests are broken due to executing with NUnitLite. Once the NUnit runner is updated for RC2 (nunit/nunit#1371), I'll open a new PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request: [WIP] (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the pull request:

    https://github.com/apache/log4net/pull/16#issuecomment-163839682
  
    referenced in LOG4NET-467 https://issues.apache.org/jira/browse/LOG4NET-467


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    > @arkadiuszwojcik the goal of this PR is to make log4net portable across .NET Core platforms. Implementing those abstractions could be useful, but doing so wouldn't enable consuming log4net on additional platforms.
    
    I agree and I think that can be a separate repo / package, something like log4net.Extensions.Logging. However, having this Extensions package first hand from original vendor (Apache) is vital on multiple accounts.
    
    ---
    
    Separately, can this PR get some prio love from the reviews please? All the providers listed here: https://github.com/aspnet/Logging#providers, are not as popular as log4net and we (folks running stuff on dotnet core) hoping to get our hands on apache/log4net bits.
    
    @chlowell, could you please prepare a SVN patch for the reviewers? We can always have subsequent PRs to refine stuff. If you are aiming to add CI setup for .NET Core TxM as part of this PR, feel free to grab Travis/AppVeyor bits from https://github.com/autofac/Autofac.Extras.Moq/pull/6/files.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by robcube <gi...@git.apache.org>.
Github user robcube commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Bingo, found the culprit:
    ```
        <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
          <locationInfo value="true" />
        </layout>
    ```
    
    Changed it to
    ` <layout type="log4net.Layout.SimpleLayout" />`
    
    Problem solved. :-) I guess XmlLayoutSchemaLog4j isn't quite there yet.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: [WIP] (LOG4NET-467) .NET Core support

Posted by arkadiuszwojcik <gi...@git.apache.org>.
Github user arkadiuszwojcik commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    I suggest all of you switch to:
    
    https://www.nuget.org/packages/Microsoft.Extensions.Logging.Abstractions/
    
    and create log4net port for that. Actually it is quite easy to create it on your own.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by SeanSnyders <gi...@git.apache.org>.
Github user SeanSnyders commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @bodewig I've downloaded[ your 2.0.6 version from myget ](https://www.myget.org/feed/log4net-test/package/nuget/log4net )but get an exception thrown during init of my logger in a NetCoreApp 1.1.0 application targeting win10-x64.
    
    Now, I'm a bit new to .Net Core, but my same code runs fine using latest 2.0.5 on .Net 4.6.1.
    
    Any chance of getting a `.pdb` of 2.0.6 so I can dig a bit deeper into where the exception occur with a sensible stack trace?
    
    At a high level, I get these:
    ![image](https://cloud.githubusercontent.com/assets/1384135/20736496/d16db8a8-b70b-11e6-9926-242928f7f20e.png)
    
    in my code on line 176  here:
    ![image](https://cloud.githubusercontent.com/assets/1384135/20736483/b6817fa2-b70b-11e6-9c00-cb9b179d99a1.png)
    
    If I add the dependency of `System.Collections.NonGeneric 4.3.0` to my `project.json`, I still get an exception of:
    ![image](https://cloud.githubusercontent.com/assets/1384135/20736578/4d63a936-b70c-11e6-822b-f69e20e9a6b2.png)
    
    Is the nuget package for 2.0.6 specifying all the dependencies? What am I missing here?
    
    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by wjdavis5 <gi...@git.apache.org>.
Github user wjdavis5 commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Following the MSFT release yesterday - https://blogs.msdn.microsoft.com/dotnet/2016/09/26/introducing-net-standard/
    
    It looks like this should be bumped to Net Standard 1.6
    I did so locally and the build output is good, I'll PR back to this fork to hopefully get this PR updated.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    I think c661441 holds the necessary changes. Unfortunately assembling the release bits for log4net still requires two different VMs and about an hour of time, so I may need a few days before I can re-create the package.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net pull request: [WIP] (LOG4NET-467) .NET Core support

Posted by chester89 <gi...@git.apache.org>.
Github user chester89 commented on the pull request:

    https://github.com/apache/log4net/pull/16#issuecomment-222102483
  
    @chlowell any updates on this?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    log4net development is coordinated via the mailing list :-)
    
    https://lists.apache.org/thread.html/3dafd7f063d6106ca9ca20379f5851a10e1588e9d1ce955d23e93a62@%3Clog4net-dev.logging.apache.org%3E
    
    a test build has been available for about two weeks now, with nobody testing it, or so it seems.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by jasonwilliams200OK <gi...@git.apache.org>.
Github user jasonwilliams200OK commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @bodewig, #30 fixed exactly this issue. Can you try with my branch?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Thank you very much @chlowell 
    
    @TAGC the code is in Apache's svn trunk and has been integrated with the build system by now. There are some lose ends and the biggest task is likely updating all documentation but I'm positive we aren't that far away from cutting the next release of log4net which will also include the .NET Core version. "not that far" may still get measured in weeks rather than days, though. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by chlowell <gi...@git.apache.org>.
Github user chlowell commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    @bodewig I chose the version number to prevent any confusion between prerelease and published packages. There's no reason not to change it before release.
    
    I chose `netstandard1.3` because it's the lowest version with the required APIs. Targeting a higher version than necessary generally brings no benefit. For example, UAP 10.0 (the current version) supports `netstandard1.4`. If log4net targets `netstandard1.6`, UWP apps won't be able to use it (at least, not without a hack). There's more on this in the [docs](https://docs.microsoft.com/en-us/dotnet/articles/standard/library#net-platforms-support).
    
    There's no need to worry about overriding--a project targeting .NET Framework 4.5 or below won't use the `netstandard1.3` assembly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] log4net issue #16: (LOG4NET-467) .NET Core support

Posted by bodewig <gi...@git.apache.org>.
Github user bodewig commented on the issue:

    https://github.com/apache/log4net/pull/16
  
    Many thanks for your persistence.
    
    I have applied the patch as is as it didn't break anything of the existing build. But I haven't even tried to build the .NET Core part itself - I'll do so later, and try to figure out how to cut releases that contain the .NET Core assembly as well as the current process is centered around NAnt.
    
    I'd like to invite anybody interested in keeping log4net moving to join the log4net-dev mailing list and lend a hand. We are severely understaffed and can use any help.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---