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 camitz <gi...@git.apache.org> on 2014/04/22 16:00:10 UTC

[GitHub] log4net pull request: Support for types with non-parameter less co...

GitHub user camitz opened a pull request:

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

    Support for types with non-parameter less constructors in XmlHierarchyConfigurator.cs

    The constructor parameters are taken from the corresponding values of
    the child nodes.
    
    You can add for instance
    
         <standardunit type="Amazon.CloudWatch.StandardUnit">
              <value value="Kilobytes"/>
         </standardunit>
    
    where StandardUnit has only one constructor that has a string parameter
    named "value".
    
    To see why this is beneficial, see my [CloudWatchAppender](https://github.com/camitz/CloudWatchAppender/tree/StandardUnit-in-config) where I recently added support for the third party type above in config only to run into this obstacle.
    
    The changes are actually quite few, affecting some 50 lines. I don't know how to make git ignore white space changes.

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

    $ git pull https://github.com/camitz/log4net trunk

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

    https://github.com/apache/log4net/pull/10.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 #10
    
----
commit 6162b216397c2bed5a48318707436648b5e358c2
Author: Martin Camitz <ma...@gmail.com>
Date:   2014-04-22T13:36:29Z

    Support for types of non-parameterless constructors in XmlConfigurator.
    
    The constructor parameters are taken from the corresponding values of
    the child nodes.
    
    You can add for instance
    
    <standardunit type="Amazon.CloudWatch.StandardUnit">
    <value value="Kilobytes"/>
    </standardunit>
    
    where StandardUnit has only one constructor that has a string parameter
    named "value".

commit 3a4125fba3fa11fb9e10135d87fd50afcc644031
Author: Martin Camitz <ma...@gmail.com>
Date:   2014-04-22T13:44:46Z

    Deleting/ignoring build

commit 285be7a1a034fa34a8fca32b2ffecc190bb858c2
Author: Martin Camitz <ma...@gmail.com>
Date:   2014-04-22T13:48:44Z

    Deleting/ignoring .gitignore.

commit a60f6676b0add52f4873cbe2efca52327f7eec5f
Author: Martin Camitz <ma...@gmail.com>
Date:   2014-04-22T13:52:48Z

    Deleting/ignoring obj and log4net.xml

----


---
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: Support for types with non-parameter less co...

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

    https://github.com/apache/log4net/pull/10#issuecomment-89774707
  
    Almost a year, wow.  Sorry about that.
    
    https://github.com/apache/log4net/compare/trunk...bodewig:github-pr10?expand=1 contains a rebased version of your PR - I've made the original and your change's indentations match so it is easier to see what has been changed.
    
    We should probably try to make this work for .NET 2.0 as well, so the LINQ stuff needs to be replaced, which will certainly make the change look bigger.
    
    Also, it would be good to have unit tests for 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.
---