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

Is .NET Core, will be supported in the near future, or not

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.13
    • Fix Version/s: 2.0.6
    • Component/s: Core
    • Labels:

      Description

      As you know, ms is moving heavily toward .Net core:
      https://github.com/dotnet/core

      so, is there a road map for making a version that supports it?

      and i noticed that log4net, has not been updated for 2 years.

      so is it maintained, or being forgotten?

      1. LOG4NET-467.patch
        154 kB
        Charles Lowell

        Issue Links

          Activity

          Hide
          nachbarslumpi Dominik Psenner added a comment -

          It is probably too early to comment or even decide what work will have to be done on log4net when dotnet core gets released. It might be possible that log4net is already compatible because, in a nutshell, dotnet core packs everything platform specific into separate libraries that are referened, fetched and included locally on demand. All the rest mostly stays the same. But that might be just me oversimplifying things.

          Nevertheless: If you require log4net to work together with dotnet core, you should start to work on it for yourselve and share the results! It would be impudent to let others do your work. As you know most of us do this in our sparetime and everyone has its own priority queue. On mine there is no dotnet core, yet.

          As for the other question, Log4net does its job and when it doesnt it gets its attention. Major releases are neither planned, nor required at the moment. It has its position in the apache logging family and there is no reason why this should change in the near future.

          Hth, d.

          Show
          nachbarslumpi Dominik Psenner added a comment - It is probably too early to comment or even decide what work will have to be done on log4net when dotnet core gets released. It might be possible that log4net is already compatible because, in a nutshell, dotnet core packs everything platform specific into separate libraries that are referened, fetched and included locally on demand. All the rest mostly stays the same. But that might be just me oversimplifying things. Nevertheless: If you require log4net to work together with dotnet core, you should start to work on it for yourselve and share the results! It would be impudent to let others do your work. As you know most of us do this in our sparetime and everyone has its own priority queue. On mine there is no dotnet core, yet. As for the other question, Log4net does its job and when it doesnt it gets its attention. Major releases are neither planned, nor required at the moment. It has its position in the apache logging family and there is no reason why this should change in the near future. Hth, d.
          Hide
          chlowe Charles Lowell added a comment -

          I've added .NET Core support for most features of log4net. You can see more details and the code in my pull request at https://github.com/apache/log4net/pull/16. I'd appreciate any feedback on the usefulness of my work so far and which missing features are most important to you. Thanks!

          Show
          chlowe Charles Lowell added a comment - I've added .NET Core support for most features of log4net. You can see more details and the code in my pull request at https://github.com/apache/log4net/pull/16 . I'd appreciate any feedback on the usefulness of my work so far and which missing features are most important to you. Thanks!
          Hide
          _nn_ NN added a comment -

          Charles Lowell Are pull requests supported at all ?
          As I understand the only option is to provide a patch here.
          Very unpleasant but this what we have.

          Show
          _nn_ NN added a comment - Charles Lowell Are pull requests supported at all ? As I understand the only option is to provide a patch here. Very unpleasant but this what we have.
          Hide
          chlowe Charles Lowell added a comment -

          I think you're correct that the code lives in SVN and changes are always merged via patches, even when they originate on GitHub. I can provide a patch here in addition to the pull request, if that would be a convenient format for reviewing the changes.

          Show
          chlowe Charles Lowell added a comment - I think you're correct that the code lives in SVN and changes are always merged via patches, even when they originate on GitHub. I can provide a patch here in addition to the pull request, if that would be a convenient format for reviewing the changes.
          Hide
          githubbot ASF GitHub Bot added a comment -
          Show
          githubbot ASF GitHub Bot added a comment - 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
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user chester89 commented on the pull request:

          https://github.com/apache/log4net/pull/16#issuecomment-222102483

          @chlowell any updates on this?

          Show
          githubbot ASF GitHub Bot added a comment - Github user chester89 commented on the pull request: https://github.com/apache/log4net/pull/16#issuecomment-222102483 @chlowell any updates on this?
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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

          Show
          githubbot ASF GitHub Bot added a comment - 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
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user pantonis commented on the issue:

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

          +1

          Show
          githubbot ASF GitHub Bot added a comment - Github user pantonis commented on the issue: https://github.com/apache/log4net/pull/16 +1
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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

          Show
          githubbot ASF GitHub Bot added a comment - 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
          Hide
          githubbot ASF GitHub Bot added a comment -

          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

          Show
          githubbot ASF GitHub Bot added a comment - 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
          Hide
          githubbot ASF GitHub Bot added a comment -

          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

          Show
          githubbot ASF GitHub Bot added a comment - 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
          Hide
          githubbot ASF GitHub Bot added a comment -

          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?

          Show
          githubbot ASF GitHub Bot added a comment - 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?
          Hide
          githubbot ASF GitHub Bot added a comment -

          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()

          Show
          githubbot ASF GitHub Bot added a comment - 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()
          Hide
          githubbot ASF GitHub Bot added a comment -

          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

          Show
          githubbot ASF GitHub Bot added a comment - 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
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          chlowe Charles Lowell added a comment - - edited

          I've attached the contents of my pull request (#16) as a patch.

          Show
          chlowe Charles Lowell added a comment - - edited I've attached the contents of my pull request (#16) as a patch.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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 @@
          +{
          + "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.

          Show
          githubbot ASF GitHub Bot added a comment - 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 @@ +{ + "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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          jasonwilliams200ok Peter Jas added a comment -

          Stefan Bodewig, Dominik Psenner,

          Could you please spare sometime here? This proposal is opened for over an year now. .NET Core has been RTM'd for a dozen of operating systems. For most part, it is working out quite well for masses.

          If this patch is passing all tests, working for us locally, on Travis / AppVeyor / Jenkins CIS' and everywhere we need log4net, is there still a reason not to accept this patch? This patch is mostly using preprocessor directives, making a very little alteration for the existing code paths and mainly adding support for an additional/new/trendy framework.

          PLEASE note that this is an open source community which is showing interest here.. A beta release for .NET Core support would be a good gesture from Apache to it's consumers. If something breaks in beta, community members will send patches to help themselves (DIY model of OSS). If this is still NOT going to happen for some subtle reasons, please do tell and close the PR, so we know the maintainers' stance.

          Show
          jasonwilliams200ok Peter Jas added a comment - Stefan Bodewig , Dominik Psenner , Could you please spare sometime here? This proposal is opened for over an year now. .NET Core has been RTM'd for a dozen of operating systems. For most part, it is working out quite well for masses. If this patch is passing all tests, working for us locally, on Travis / AppVeyor / Jenkins CIS' and everywhere we need log4net, is there still a reason not to accept this patch? This patch is mostly using preprocessor directives, making a very little alteration for the existing code paths and mainly adding support for an additional/new/trendy framework. PLEASE note that this is an open source community which is showing interest here.. A beta release for .NET Core support would be a good gesture from Apache to it's consumers. If something breaks in beta, community members will send patches to help themselves (DIY model of OSS). If this is still NOT going to happen for some subtle reasons, please do tell and close the PR, so we know the maintainers' stance.
          Hide
          bodewig Stefan Bodewig added a comment -

          Peter Jas the real problem here is lack of time. Neither Dominik Psenner nor myself are able to devote as much time to log4net as would be necessary and despite all our efforts to find additional folks who'd stick around for longer than a single pull request, this just never happened.

          Unfortunately the PR doesn't use NAnt - because it isn't possible at all, I guess, as NAnt seems to be stuck in a situation similar to ours. This also means the release process which is incredibly cumbersome anyway will now require to switch build tools. Figuring out how to do that is going to cost time. Same goes for updating the documentation.

          Don't get me wrong, I really appreciate the effort being made, I'm just not able to keep up.

          Show
          bodewig Stefan Bodewig added a comment - Peter Jas the real problem here is lack of time. Neither Dominik Psenner nor myself are able to devote as much time to log4net as would be necessary and despite all our efforts to find additional folks who'd stick around for longer than a single pull request, this just never happened. Unfortunately the PR doesn't use NAnt - because it isn't possible at all, I guess, as NAnt seems to be stuck in a situation similar to ours. This also means the release process which is incredibly cumbersome anyway will now require to switch build tools. Figuring out how to do that is going to cost time. Same goes for updating the documentation. Don't get me wrong, I really appreciate the effort being made, I'm just not able to keep up.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

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

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/log4net/pull/16
          Hide
          bodewig Stefan Bodewig added a comment -

          I've applied the patch and will continue the discussion on the PR itself. To be honest, I'd much prefer to continue it on the log4net-dev mailing list.

          Show
          bodewig Stefan Bodewig added a comment - I've applied the patch and will continue the discussion on the PR itself. To be honest, I'd much prefer to continue it on the log4net-dev mailing list.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user jasonwilliams200OK commented on the issue:

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

          Fixed the build breakage and feedback in #30.

          Show
          githubbot ASF GitHub Bot added a comment - Github user jasonwilliams200OK commented on the issue: https://github.com/apache/log4net/pull/16 Fixed the build breakage and feedback in #30.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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`.

          Show
          githubbot ASF GitHub Bot added a comment - 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`.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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?

          Show
          githubbot ASF GitHub Bot added a comment - 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?
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.
          ```

          Show
          githubbot ASF GitHub Bot added a comment - 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. ```
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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?

          Show
          githubbot ASF GitHub Bot added a comment - 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?
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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?

          Show
          githubbot ASF GitHub Bot added a comment - 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?
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user TAGC commented on the issue:

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

          That's for the info. 👍

          Show
          githubbot ASF GitHub Bot added a comment - Github user TAGC commented on the issue: https://github.com/apache/log4net/pull/16 That's for the info. 👍
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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?

          Show
          githubbot ASF GitHub Bot added a comment - 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?
          Hide
          githubbot ASF GitHub Bot added a comment -

          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" <notifications@github.com> wrote:

          > Hi, do you guys have a release date for the new package? 2.0.6?
          >
          > —
          > 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>
          > .
          >

          Show
          githubbot ASF GitHub Bot added a comment - 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" <notifications@github.com> wrote: > Hi, do you guys have a release date for the new package? 2.0.6? > > — > 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 > > . >
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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

          Show
          githubbot ASF GitHub Bot added a comment - 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
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          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?

          Show
          githubbot ASF GitHub Bot added a comment - 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?
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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)

          Show
          githubbot ASF GitHub Bot added a comment - 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)
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user SeanSnyders commented on the issue:

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

          @bodewig Great, I'll try it again.

          Show
          githubbot ASF GitHub Bot added a comment - Github user SeanSnyders commented on the issue: https://github.com/apache/log4net/pull/16 @bodewig Great, I'll try it again.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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?

          Show
          githubbot ASF GitHub Bot added a comment - 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?
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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)
          ```

          Show
          githubbot ASF GitHub Bot added a comment - 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) ```
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.
          Hide
          githubbot ASF GitHub Bot added a comment -

          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.

          Show
          githubbot ASF GitHub Bot added a comment - 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.

            People

            • Assignee:
              Unassigned
              Reporter:
              san_kan1gb san kan
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development