You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Nicholas Duane <ni...@msn.com> on 2016/10/03 02:21:02 UTC

Re: Apache log4net Needs Help

Just curious if anyone has any feedback?  One reason I ask is because I again just got an email from someone in my group and it's in reference to the COE (Center Of Excellence) team wanting to recommend nlog for the enterprise for logging on Windows/.NET.


Thanks,

Nick

________________________________
From: Nicholas Duane <ni...@msn.com>
Sent: Tuesday, September 20, 2016 10:03 AM
To: log4net-user@logging.apache.org
Subject: Re: Apache log4net Needs Help


Maybe a bit of history would help.


We had written our own logging framework a while back, prior to the launch of .NET.  It was a Windows only framework which under the covers used ETW (Event Trace for Windows), a very high performance logging mechanism which is used by the Windows kernel and other Microsoft products, like SQL Server.  Shortly after .NET was launched we created a managed interface for that.  That was running fine for 10+ years and is still running fine.


More recently we had the need to capture a specific type of event across many application in the enterprise.  While we could have attempted to use our existing logging framework we would have needed to extend it for a couple reasons:


1. It was a Windows only framework and we would need to support both Windows and Java, the majority of Java applications running on Linux.


2.  It currently exposed a fixed set of events that could be raised.  This new event would have to be added to the fixed set or we would have had to open up the API and allow the consumer to specify their own schema.


3. It captured the events in a relational database.  We want to route this new event to an HDFS backend.


We decided to look at off the shelf logging frameworks instead of creating one of our own.  While there are several logging frameworks on the java side, log4j/log4j2 appeared to be the clear winner.  On the .NET side there was no "clear" winner.  We looked at System.Diagnostics (the logging/tracing classes provided by .NET), nlog, log4net and Enterprise Logging (the application block).  From that list only nlog and log4net were viable options.  One of the major issues people had with log4net was the fact that it appeared it had been abandoned, which I guess it was.  The 1.2.13 release had been out for more than 2 years I think.  In fact, our .NET Center of Excellence team was recommending nlog for .NET and I think one of the main reasons for that was the lack of development on log4net.


There were a few things I liked about log4net.


* The fact that it was a port of log4j I saw as a benefit.  If I'm looking for a logging framework for both .net and java and I can get the same framework that works on both that's ideal.  It means both would roughly have the same or similar API and features.  Ideally the configuration is the same or similar for both.


* I'm pretty sure I looked over the nlog api and didn't like it as much as the log4net api.


* I also liked, and thought was a key feature, the "logger" inheritance feature of both log4net and log4j(2).


Thanks,

Nick

________________________________
From: Dominik Psenner <dp...@gmail.com>
Sent: Tuesday, September 20, 2016 2:26 AM
To: log4net-user@logging.apache.org
Subject: Re: Apache log4net Needs Help


That's an interesting point. Would you mind to share your thoughts and reasons why you picked log4net over other logging frameworks beyond being a log4j port?

On 2016-09-20 01:30, Nicholas Duane wrote:

I can understand the breaking changes thing, but my impression is that straying from the log4j design is a bad idea.  What I think would be ideal is an apache logging architecture/design and then ports to java, log4j, and .NET, log4net.  One of the big benefits I see is having "relatively" the same logging framework run on both major platforms.


The one reason we picked log4net is because we chose lo4j2 on java.  And having similar design was a benefit.  If we evaluated log4net on its own I'm not sure we would have picked it.


Thanks,

Nick

________________________________
From: Walden H. Leverich <wa...@techsoftinc.com>
Sent: Monday, September 19, 2016 3:49 PM
To: Log4NET User
Subject: RE: Apache log4net Needs Help


> Any chance that we'll get a log4net version which is a "port" of the latest log4j2?



Maybe this is a discussion for the dev list, and granted I haven’t looked at what the changes are in log4j2, but my gut reaction is that a new port might be a bad idea. Yes, log4net started as a port of log4j (or at least that’s my understanding) but it’s a mature logging framework in its own right today with a huge user base and numerous production deployments. A new “port” sounds to me like it’s synonymous with breaking changes and that’s a colossally bad idea.



Are there things we can learn from the latest log4j2? Of course there are. Maybe there should be a log4net2 project? I don’t know. But whatever the evolution is of log4net it needs to be something that isn’t so revolutionary as to cause me to reevaluate my logging infrastructure.



-Walden



--
Walden H Leverich III
(516) 627-3800 x3051
WaldenL@TechSoftInc.com<ma...@TechSoftInc.com>



From: Nicholas Duane [mailto:nickdu@msn.com]
Sent: Wednesday, September 14, 2016 9:19 AM
To: Log4NET User <lo...@logging.apache.org>
Subject: Re: Apache log4net Needs Help



I had asked about this in the past and I figured I would ask again after seeing this mail.  Any chance that we'll get a log4net version which is a "port" of the latest log4j2?



Thanks,

Nick



________________________________

From: Stefan Bodewig <bo...@apache.org>>
Sent: Wednesday, September 14, 2016 12:32 AM
To: Log4NET User
Subject: Re: Apache log4net Needs Help



Welcome!

even though the official build system currently is NAnt, development
with your setup is supposed to work (if it doesn't, it is a bug).

The first thing you should do is to join the log4net-dev mailing list.

I think we need help in virtually any area - fixing bug, discussing
changes, documentation, testing ... you name it.

In general you pick what you want to work on, nobody is going to assign
work to anybody else. We are all doing this in our spare time and it is
supposed to be fun :-)

You may want to take a look at the JIRA issues to see whether you find
anything you'd like to work on. You know better than anybody else where
you can use your talent best - and what would be interesting to you.

Cheers

        Stefan

On 2016-09-13, Shivinder Singh wrote:

> Hello,
> I use log4net too, but in Windows/IIS/Visual Studio environment. If there is anything I can do let me know.

> Thanks,
> Shivinder Singh
>> 1-409-330-3608
> shivindersingh@hotmail.com<ma...@hotmail.com>


>> From: bodewig@apache.org<ma...@apache.org>
>> To: log4net-dev@logging.apache.org<ma...@logging.apache.org>
>> Subject: Apache log4net Needs Help
>> CC: log4net-user@logging.apache.org<ma...@logging.apache.org>; general@logging.apache.org<ma...@logging.apache.org>; dev@lucenenet.apache.org<ma...@lucenenet.apache.org>
>> Date: Tue, 6 Sep 2016 06:12:19 +0200

>> This is a general call-to-arms for everyone who uses log4net as their
>> logging solution. If log4net is the logging framework that you are
>> using and would like to keep using in the future it is time now to get
>> involved. The project needs a larger developing community to move on!
>> We really need more people who want to shape the future of log4net at
>> the Apache Software Foundation.

>> In all the time since log4net has been started by Nicko Cadell more
>> than ten years ago, there have never been more than two or three
>> people regularly contributing to it. As is normal in open source
>> projects people have come and gone when their interests or just the
>> amount of time they could invest have changed.

>> At the moment Dominik Psenner and Stefan Bodewig are the only people
>> semi-actively working on log4net and neither of them is able to devote
>> as much time to the project as they'd like to and as would be
>> required.

>> Realistically log4net is maintenance mode where development of new
>> features is not going to happen.

>> This has repeatedly made log4net lag behind recent developments in the
>> .NET world. It took a long time to get a version out that properly
>> worked with .NET 4.0 in 2011 and adaptions to .NET 4.5 also took much
>> longer than many users would have wished. We are seeing it again with
>> .NET Core right now. In addition there are many unresolved issues in
>> log4net's JIRA.

>> Despite this there are more than 2500 downloads of the logging
>> framework every day from nuget. We are asking you, the log4net
>> community, to get your hands dirty.

>> Right now we are in the process of creating a log4net release that
>> works for .NET Core. It is a very targeted effort and it is very
>> unlikely Dominik and Stefan will be able to contribute more in the
>> future than we did during the past months.

>> If you are willing to help, please join log4net's dev mailing list and
>> raise your hand. Look through log4net's issue tracker and pick things
>> you'd like to work on. If you don't know where to start, please ask,
>> Dominik and Stefan will be there to help.

>> If there is anything holding you back from contributing, let's discuss
>> it and get it out of the way. Nothing is carved into stone, neither
>> what the future of log4net holds nor how we make it happen.

>> Links

>> log4net's JIRA:    https://issues.apache.org/jira/browse/LOG4NET

Log4net - ASF JIRA - issues.apache.org<https://issues.apache.org/jira/browse/LOG4NET>

issues.apache.org

The Apache log4net library is a tool to help the programmer output log statements to a variety of output targets. log4net is a port of the excellent Apache log4j ...


>> dev mailing list:  https://logging.apache.org/log4net/mail-lists.html
>> How the ASF works: https://www.apache.org/foundation/how-it-works.html
>>                    https://www.apache.org/dev/contributors.html


RE: Apache log4net Needs Help

Posted by Joe <Jo...@hotmail.com>.
I'm interested in this as I've also written an async appender.  Mine is currently lossy both at application shutdown and when the application floods it with events faster than it can process them, so to date I haven't been too concerned by this issue.

Do you have an MCVE (http://stackoverflow.com/help/mcve) for the problem you describe in your StackOverflow post?   If so I'd be happy to take a look.

Log4net already exposes a shutdown routine (LogManager.Shutdown()).  If pull request #37 (https://github.com/apache/log4net/pull/37) is implemented, your app could also call LogManager.Flush at shutdown.

A comment in RemotingAppender.OnClose, which is asynchronous, implies that queued background threads may not complete if called from the ProcessExit event (total execution time of ProcessExit event handlers limited to 2 seonds by default).


From: Nicholas Duane [mailto:nickdu@msn.com]
Sent: 16 October 2016 04:23
To: Log4NET User
Subject: Re: Apache log4net Needs Help


By the way, what's the state of async appenders in log4net?  I ask because the guys pushing nlog over here say that one reason they like nlog is that is allows for async operation.  I assumed log4net supports that also, however when I attempted to do some async stuff in log4net I did run into problems:



http://stackoverflow.com/questions/36344822/log4net-appenders-onclose-doesnt-seem-to-work



Seems like log4net should not only expose a startup routine the app must call but also a shutdown routine, and indicate that it's essential it gets called.  Then log4net could shutdown the appenders in the shutdown routine as opposed to relying on .NET's appdomain shutdown logic.



Thanks,

Nick

Re: AsyncAppender (was Re: Apache log4net Needs Help)

Posted by Stefan Bodewig <bo...@apache.org>.
Hi Nicholas

On 2016-11-01, Nicholas Duane wrote:

> Got some questions around this.  I was hoping that if I put the call
> to LogManager.Shutdown() in my application it might call Close() on
> all the appenders.  However, that doesn't seem to be the case.

That's what I would have expected as well. This is code I've never
touched and I'm not familiar with the implementation choices back then,
but LogManager.Shutdown() leads to Logger.CloseNestedAppenders() which
only closes Appenders that are IAppenderAttachable.

I'm what to make from this myself.

> Not sure if the Flush() you talk about is something that might have
> solved my problem.

At least it is going to Flush all appenders.

> I checked over the links you provided.  One talks about implementing a
> queue in an async appender so that each developer wouldn't have to do
> it.  While that certainly sounds like a good thing to do, even this
> implementation would need to flush its queue, or at least do as much
> as it could in the time allotted, when the process shuts down.  That
> is the main point I'm trying to bring up as my appender has its own
> queue but the Close() method doesn't give me any significant amount of
> time to flush my queue and thus I'm losing events.

Ideas for a new implementation of the AsyncAppender are currently
discussed on the dev mailing list.

Stefan

Re: AsyncAppender (was Re: Apache log4net Needs Help)

Posted by Nicholas Duane <ni...@msn.com>.
Got some questions around this.  I was hoping that if I put the call to LogManager.Shutdown() in my application it might call Close() on all the appenders.  However, that doesn't seem to be the case.  Not sure if the Flush() you talk about is something that might have solved my problem.


I checked over the links you provided.  One talks about implementing a queue in an async appender so that each developer wouldn't have to do it.  While that certainly sounds like a good thing to do, even this implementation would need to flush its queue, or at least do as much as it could in the time allotted, when the process shuts down.  That is the main point I'm trying to bring up as my appender has its own queue but the Close() method doesn't give me any significant amount of time to flush my queue and thus I'm losing events.


One of the links also provides an AsyncAppender implementation which the author claims will address the problem of lost events on shutdown, but it appears to use the Close() method to shutdown cleanly, which I would assume suffers from the same problem I experienced.  Namely, the Close() method appears to be called from log4net by way of syncing the .NET app domain shutdown event.  At that point you're not given any time to cleanup.


Thanks,

Nick

________________________________
From: Stefan Bodewig <bo...@apache.org>
Sent: Sunday, October 16, 2016 7:32 AM
To: Log4NET User
Subject: AsyncAppender (was Re: Apache log4net Needs Help)

On 2016-10-16, Nicholas Duane wrote:

> By the way, what's the state of async appenders in log4net?

This is one of the things I'd love people to get involved in. We've got

* a simple implementation inside the sample
* https://issues.apache.org/jira/browse/LOG4NET-190
* https://issues.apache.org/jira/browse/LOG4NET-201
* https://issues.apache.org/jira/browse/LOG4NET-407

the later even made it into the 1.3 branch (that's now been
abandoned). It would be good if anybody found the time to make it work
inside the current trunk setup.

So there are few implementations. They may share the problem mentioned
here

> http://stackoverflow.com/questions/36344822/log4net-appenders-onclose-doesnt-seem-to-work

I haven't checked.

> Seems like log4net should not only expose a startup routine the app
> must call but also a shutdown routine, and indicate that it's
> essential it gets called.  Then log4net could shutdown the appenders
> in the shutdown routine as opposed to relying on .NET's appdomain
> shutdown logic.

There are Shutdown methods in LogManager and LoggerManager.

The patch Joe mentions that add Flush to certain appenders and to
LogManager has been added to svn trunk and will be part of 2.0.6 (which
will be the version of the next release).

Stefan

AsyncAppender (was Re: Apache log4net Needs Help)

Posted by Stefan Bodewig <bo...@apache.org>.
On 2016-10-16, Nicholas Duane wrote:

> By the way, what's the state of async appenders in log4net?

This is one of the things I'd love people to get involved in. We've got

* a simple implementation inside the sample
* https://issues.apache.org/jira/browse/LOG4NET-190
* https://issues.apache.org/jira/browse/LOG4NET-201
* https://issues.apache.org/jira/browse/LOG4NET-407

the later even made it into the 1.3 branch (that's now been
abandoned). It would be good if anybody found the time to make it work
inside the current trunk setup.

So there are few implementations. They may share the problem mentioned
here

> http://stackoverflow.com/questions/36344822/log4net-appenders-onclose-doesnt-seem-to-work

I haven't checked.

> Seems like log4net should not only expose a startup routine the app
> must call but also a shutdown routine, and indicate that it's
> essential it gets called.  Then log4net could shutdown the appenders
> in the shutdown routine as opposed to relying on .NET's appdomain
> shutdown logic.

There are Shutdown methods in LogManager and LoggerManager.

The patch Joe mentions that add Flush to certain appenders and to
LogManager has been added to svn trunk and will be part of 2.0.6 (which
will be the version of the next release).

Stefan

Re: Apache log4net Needs Help

Posted by Nicholas Duane <ni...@msn.com>.
By the way, what's the state of async appenders in log4net?  I ask because the guys pushing nlog over here say that one reason they like nlog is that is allows for async operation.  I assumed log4net supports that also, however when I attempted to do some async stuff in log4net I did run into problems:


http://stackoverflow.com/questions/36344822/log4net-appenders-onclose-doesnt-seem-to-work


Seems like log4net should not only expose a startup routine the app must call but also a shutdown routine, and indicate that it's essential it gets called.  Then log4net could shutdown the appenders in the shutdown routine as opposed to relying on .NET's appdomain shutdown logic.


Thanks,

Nick

________________________________
From: Nicholas Duane <ni...@msn.com>
Sent: Tuesday, October 4, 2016 4:28 PM
To: Log4NET User
Subject: Re: Apache log4net Needs Help


>Whether a log4j2 port happens or not really is decided by the people who
>are willing and able to invest the time needed. The same is true for any
>other decision we take. There is no "business plan" for log4net, those
>who do the work decide about what gets done.


Wow.  So the developers are going to decide the feature in the product?  I would have thought, and hoped, that the apache foundation, would be making the strategic decision on product direction.


As I mentioned, it's my opinion that there should be a single logging architecture/design which is ported to both linux/java and windows/.net.  Anything else doesn't make sense, at least to me.


Thanks,

Nick

________________________________
From: Stefan Bodewig <bo...@apache.org>
Sent: Tuesday, October 4, 2016 10:06 AM
To: Log4NET User
Subject: Re: Apache log4net Needs Help

On 2016-10-04, Nicholas Duane wrote:

> While I realize resources are needed to make any changes to the code base, even if resources are/become available it's yet another (big?) decision on whether the changes that are made to log4net are ones which will take it off into its own direction or whether a new version of log4net is created which is a port of lo4j2.

Absolutely. That's why I qualified it with "who want to do the porting
work" :-)

Whether a log4j2 port happens or not really is decided by the people who
are willing and able to invest the time needed. The same is true for any
other decision we take. There is no "business plan" for log4net, those
who do the work decide about what gets done.

I hear you and I understand why a log4net closer to log4j2 might be
attractive but I am completely unable to devote the time needed for
something that would more or less amount in a rewrite.

Cheers

        Stefan

Re: Apache log4net Needs Help

Posted by Stefan Bodewig <bo...@apache.org>.
On 2016-10-04, Nicholas Duane wrote:

>> Whether a log4j2 port happens or not really is decided by the people who
>> are willing and able to invest the time needed. The same is true for any
>> other decision we take. There is no "business plan" for log4net, those
>> who do the work decide about what gets done.


> Wow.  So the developers are going to decide the feature in the
> product?

Right. This is open source ;-)

> I would have thought, and hoped, that the apache foundation, would be
> making the strategic decision on product direction.

No, this would be a misconception. "The Apache Software Foundation"
provides infrastructure and the legal framework for its projects, any
other decision is delegated to "the project". And "the project" is, in
the end, the group of developers working on it.

Many of the active people at the ASF I know - including myself -
wouldn't be here if there were other people who told them what to work
on. Most of us are volunteers spending their spare time.

> As I mentioned, it's my opinion that there should be a single logging architecture/design which is ported to both linux/java and windows/.net.  Anything else doesn't make sense, at least to me.

This is a discussion to have on the general@logging.apache.org.

The groups of people working on log4net and log4j are more or less
disjunct. It took a long time to carve out log4j 2.x (and pain, if my
remote observations are correct) and log4net hasn't been following it at
all - most likely because we haven't had enough people with enough time
looking after log4net back then as well.

I understand your point, but one consequence would likely be that log4j
was slowed down by log4net if we were striving for feature
parity. Slowed down severly.

Cheers

        Stefan

Re: Apache log4net Needs Help

Posted by Nicholas Duane <ni...@msn.com>.
>Whether a log4j2 port happens or not really is decided by the people who
>are willing and able to invest the time needed. The same is true for any
>other decision we take. There is no "business plan" for log4net, those
>who do the work decide about what gets done.


Wow.  So the developers are going to decide the feature in the product?  I would have thought, and hoped, that the apache foundation, would be making the strategic decision on product direction.


As I mentioned, it's my opinion that there should be a single logging architecture/design which is ported to both linux/java and windows/.net.  Anything else doesn't make sense, at least to me.


Thanks,

Nick

________________________________
From: Stefan Bodewig <bo...@apache.org>
Sent: Tuesday, October 4, 2016 10:06 AM
To: Log4NET User
Subject: Re: Apache log4net Needs Help

On 2016-10-04, Nicholas Duane wrote:

> While I realize resources are needed to make any changes to the code base, even if resources are/become available it's yet another (big?) decision on whether the changes that are made to log4net are ones which will take it off into its own direction or whether a new version of log4net is created which is a port of lo4j2.

Absolutely. That's why I qualified it with "who want to do the porting
work" :-)

Whether a log4j2 port happens or not really is decided by the people who
are willing and able to invest the time needed. The same is true for any
other decision we take. There is no "business plan" for log4net, those
who do the work decide about what gets done.

I hear you and I understand why a log4net closer to log4j2 might be
attractive but I am completely unable to devote the time needed for
something that would more or less amount in a rewrite.

Cheers

        Stefan

Re: Apache log4net Needs Help

Posted by Stefan Bodewig <bo...@apache.org>.
On 2016-10-04, Nicholas Duane wrote:

> While I realize resources are needed to make any changes to the code base, even if resources are/become available it's yet another (big?) decision on whether the changes that are made to log4net are ones which will take it off into its own direction or whether a new version of log4net is created which is a port of lo4j2.

Absolutely. That's why I qualified it with "who want to do the porting
work" :-)

Whether a log4j2 port happens or not really is decided by the people who
are willing and able to invest the time needed. The same is true for any
other decision we take. There is no "business plan" for log4net, those
who do the work decide about what gets done.

I hear you and I understand why a log4net closer to log4j2 might be
attractive but I am completely unable to devote the time needed for
something that would more or less amount in a rewrite.

Cheers

        Stefan

Re: Apache log4net Needs Help

Posted by Nicholas Duane <ni...@msn.com>.
Thanks.


While I realize resources are needed to make any changes to the code base, even if resources are/become available it's yet another (big?) decision on whether the changes that are made to log4net are ones which will take it off into its own direction or whether a new version of log4net is created which is a port of lo4j2.


Thanks,

Nick

________________________________
From: Stefan Bodewig <bo...@apache.org>
Sent: Tuesday, October 4, 2016 12:18 AM
To: log4net-user@logging.apache.org
Subject: Re: Apache log4net Needs Help

On 2016-10-03, Nicholas Duane wrote:

> Just curious if anyone has any feedback?

I think I've written this before, but in case I haven't:

Whether a port of log4j 2.x will happen depends on whether people show
up who want to do the porting work. This hasn't happened, yet.

Cheers

        Stefan

Re: Apache log4net Needs Help

Posted by Stefan Bodewig <bo...@apache.org>.
On 2016-10-03, Nicholas Duane wrote:

> Just curious if anyone has any feedback?

I think I've written this before, but in case I haven't:

Whether a port of log4j 2.x will happen depends on whether people show
up who want to do the porting work. This hasn't happened, yet.

Cheers

        Stefan

Re: Apache log4net Needs Help

Posted by Nicholas Duane <ni...@msn.com>.
Thanks for the reply.


I'm not looking for anyone to give me reasons to go with log4net, I have already made that decision.  Since it seems there's interest as of late to find more resources to provide enhancements to log4net I wanted to voice my concern over diverging from log4j(2).  As I mentioned, I think one of the major benefits of log4net was its relation to log4j.  That was a big reason for me picking log4net over nlog.  I realize others might not have the same reasons, but I would find it hard to believe that if you're working in a large enterprise with applications on both Windows/.NET and Linux/Java and you're looking to adopt a logging framework, that having similar frameworks across the two platforms would not be a big benefit.


So I guess I'm bringing this up for selfish reasons.  I want to see log4net become a port of log4j2.  And I wouldn't mind helping with that effort.  But I would not be interested in helping if log4net is going off in its own direction since that is a bad idea in my opinion.


Thanks,

Nick


________________________________
From: Dominik Psenner <dp...@gmail.com>
Sent: Monday, October 3, 2016 2:49 AM
To: log4net-user@logging.apache.org
Subject: Re: Apache log4net Needs Help


One thing to note is that the development of a stable logging framework is rather slow. I would not want the most stable (in regards of features and API) part of a software to need regular updates. This is one of the main reasons why we mainly focus on stability issues. The lack of manpower influences the development of new features. There are a few ideas/issues that we would like to address, but with the estimated efforts we are unable to complete these tasks in the near future.


Note, too, that nobody here is going to sell you log4net as the logging framework that works for you. It is (probably) your task to find a solution that works for you. That said, I usually implement a logging facade in every project unless the project is too small or short-lived. This allows us to decouple the application from third party dependencies and increases maintainability. Until now we never had to change the logging framework but nobody can predict the future and it is better to have yet another layer of abstraction than having to refactor thousands of logging statements anytime in the future.


Beside that, what kind of feedback do you expect? I will gladly answer your questions.


Best regards

Dominik

On 03/10/2016 04:21, Nicholas Duane wrote:

Just curious if anyone has any feedback?  One reason I ask is because I again just got an email from someone in my group and it's in reference to the COE (Center Of Excellence) team wanting to recommend nlog for the enterprise for logging on Windows/.NET.


Thanks,

Nick

________________________________
From: Nicholas Duane <ni...@msn.com>
Sent: Tuesday, September 20, 2016 10:03 AM
To: log4net-user@logging.apache.org<ma...@logging.apache.org>
Subject: Re: Apache log4net Needs Help


Maybe a bit of history would help.


We had written our own logging framework a while back, prior to the launch of .NET.  It was a Windows only framework which under the covers used ETW (Event Trace for Windows), a very high performance logging mechanism which is used by the Windows kernel and other Microsoft products, like SQL Server.  Shortly after .NET was launched we created a managed interface for that.  That was running fine for 10+ years and is still running fine.


More recently we had the need to capture a specific type of event across many application in the enterprise.  While we could have attempted to use our existing logging framework we would have needed to extend it for a couple reasons:


1. It was a Windows only framework and we would need to support both Windows and Java, the majority of Java applications running on Linux.


2.  It currently exposed a fixed set of events that could be raised.  This new event would have to be added to the fixed set or we would have had to open up the API and allow the consumer to specify their own schema.


3. It captured the events in a relational database.  We want to route this new event to an HDFS backend.


We decided to look at off the shelf logging frameworks instead of creating one of our own.  While there are several logging frameworks on the java side, log4j/log4j2 appeared to be the clear winner.  On the .NET side there was no "clear" winner.  We looked at System.Diagnostics (the logging/tracing classes provided by .NET), nlog, log4net and Enterprise Logging (the application block).  From that list only nlog and log4net were viable options.  One of the major issues people had with log4net was the fact that it appeared it had been abandoned, which I guess it was.  The 1.2.13 release had been out for more than 2 years I think.  In fact, our .NET Center of Excellence team was recommending nlog for .NET and I think one of the main reasons for that was the lack of development on log4net.


There were a few things I liked about log4net.


* The fact that it was a port of log4j I saw as a benefit.  If I'm looking for a logging framework for both .net and java and I can get the same framework that works on both that's ideal.  It means both would roughly have the same or similar API and features.  Ideally the configuration is the same or similar for both.


* I'm pretty sure I looked over the nlog api and didn't like it as much as the log4net api.


* I also liked, and thought was a key feature, the "logger" inheritance feature of both log4net and log4j(2).


Thanks,

Nick

________________________________
From: Dominik Psenner <dp...@gmail.com>
Sent: Tuesday, September 20, 2016 2:26 AM
To: log4net-user@logging.apache.org<ma...@logging.apache.org>
Subject: Re: Apache log4net Needs Help


That's an interesting point. Would you mind to share your thoughts and reasons why you picked log4net over other logging frameworks beyond being a log4j port?

On 2016-09-20 01:30, Nicholas Duane wrote:

I can understand the breaking changes thing, but my impression is that straying from the log4j design is a bad idea.  What I think would be ideal is an apache logging architecture/design and then ports to java, log4j, and .NET, log4net.  One of the big benefits I see is having "relatively" the same logging framework run on both major platforms.


The one reason we picked log4net is because we chose lo4j2 on java.  And having similar design was a benefit.  If we evaluated log4net on its own I'm not sure we would have picked it.


Thanks,

Nick

________________________________
From: Walden H. Leverich <wa...@techsoftinc.com>
Sent: Monday, September 19, 2016 3:49 PM
To: Log4NET User
Subject: RE: Apache log4net Needs Help


> Any chance that we'll get a log4net version which is a "port" of the latest log4j2?



Maybe this is a discussion for the dev list, and granted I haven’t looked at what the changes are in log4j2, but my gut reaction is that a new port might be a bad idea. Yes, log4net started as a port of log4j (or at least that’s my understanding) but it’s a mature logging framework in its own right today with a huge user base and numerous production deployments. A new “port” sounds to me like it’s synonymous with breaking changes and that’s a colossally bad idea.



Are there things we can learn from the latest log4j2? Of course there are. Maybe there should be a log4net2 project? I don’t know. But whatever the evolution is of log4net it needs to be something that isn’t so revolutionary as to cause me to reevaluate my logging infrastructure.



-Walden



--
Walden H Leverich III
(516) 627-3800 x3051
WaldenL@TechSoftInc.com<ma...@TechSoftInc.com>



From: Nicholas Duane [mailto:nickdu@msn.com]
Sent: Wednesday, September 14, 2016 9:19 AM
To: Log4NET User <lo...@logging.apache.org>
Subject: Re: Apache log4net Needs Help



I had asked about this in the past and I figured I would ask again after seeing this mail.  Any chance that we'll get a log4net version which is a "port" of the latest log4j2?



Thanks,

Nick



________________________________

From: Stefan Bodewig <bo...@apache.org>>
Sent: Wednesday, September 14, 2016 12:32 AM
To: Log4NET User
Subject: Re: Apache log4net Needs Help



Welcome!

even though the official build system currently is NAnt, development
with your setup is supposed to work (if it doesn't, it is a bug).

The first thing you should do is to join the log4net-dev mailing list.

I think we need help in virtually any area - fixing bug, discussing
changes, documentation, testing ... you name it.

In general you pick what you want to work on, nobody is going to assign
work to anybody else. We are all doing this in our spare time and it is
supposed to be fun :-)

You may want to take a look at the JIRA issues to see whether you find
anything you'd like to work on. You know better than anybody else where
you can use your talent best - and what would be interesting to you.

Cheers

        Stefan

On 2016-09-13, Shivinder Singh wrote:

> Hello,
> I use log4net too, but in Windows/IIS/Visual Studio environment. If there is anything I can do let me know.

> Thanks,
> Shivinder Singh
>> 1-409-330-3608
> shivindersingh@hotmail.com<ma...@hotmail.com>


>> From: bodewig@apache.org<ma...@apache.org>
>> To: log4net-dev@logging.apache.org<ma...@logging.apache.org>
>> Subject: Apache log4net Needs Help
>> CC: log4net-user@logging.apache.org<ma...@logging.apache.org>; general@logging.apache.org<ma...@logging.apache.org>; dev@lucenenet.apache.org<ma...@lucenenet.apache.org>
>> Date: Tue, 6 Sep 2016 06:12:19 +0200

>> This is a general call-to-arms for everyone who uses log4net as their
>> logging solution. If log4net is the logging framework that you are
>> using and would like to keep using in the future it is time now to get
>> involved. The project needs a larger developing community to move on!
>> We really need more people who want to shape the future of log4net at
>> the Apache Software Foundation.

>> In all the time since log4net has been started by Nicko Cadell more
>> than ten years ago, there have never been more than two or three
>> people regularly contributing to it. As is normal in open source
>> projects people have come and gone when their interests or just the
>> amount of time they could invest have changed.

>> At the moment Dominik Psenner and Stefan Bodewig are the only people
>> semi-actively working on log4net and neither of them is able to devote
>> as much time to the project as they'd like to and as would be
>> required.

>> Realistically log4net is maintenance mode where development of new
>> features is not going to happen.

>> This has repeatedly made log4net lag behind recent developments in the
>> .NET world. It took a long time to get a version out that properly
>> worked with .NET 4.0 in 2011 and adaptions to .NET 4.5 also took much
>> longer than many users would have wished. We are seeing it again with
>> .NET Core right now. In addition there are many unresolved issues in
>> log4net's JIRA.

>> Despite this there are more than 2500 downloads of the logging
>> framework every day from nuget. We are asking you, the log4net
>> community, to get your hands dirty.

>> Right now we are in the process of creating a log4net release that
>> works for .NET Core. It is a very targeted effort and it is very
>> unlikely Dominik and Stefan will be able to contribute more in the
>> future than we did during the past months.

>> If you are willing to help, please join log4net's dev mailing list and
>> raise your hand. Look through log4net's issue tracker and pick things
>> you'd like to work on. If you don't know where to start, please ask,
>> Dominik and Stefan will be there to help.

>> If there is anything holding you back from contributing, let's discuss
>> it and get it out of the way. Nothing is carved into stone, neither
>> what the future of log4net holds nor how we make it happen.

>> Links

>> log4net's JIRA:    https://issues.apache.org/jira/browse/LOG4NET

Log4net - ASF JIRA - issues.apache.org<https://issues.apache.org/jira/browse/LOG4NET>

issues.apache.org

The Apache log4net library is a tool to help the programmer output log statements to a variety of output targets. log4net is a port of the excellent Apache log4j ...


>> dev mailing list:  https://logging.apache.org/log4net/mail-lists.html
>> How the ASF works: https://www.apache.org/foundation/how-it-works.html
>>                    https://www.apache.org/dev/contributors.html



Re: Apache log4net Needs Help

Posted by Dominik Psenner <dp...@gmail.com>.
One thing to note is that the development of a stable logging framework 
is rather slow. I would not want the most stable (in regards of features 
and API) part of a software to need regular updates. This is one of the 
main reasons why we mainly focus on stability issues. The lack of 
manpower influences the development of new features. There are a few 
ideas/issues that we would like to address, but with the estimated 
efforts we are unable to complete these tasks in the near future.


Note, too, that nobody here is going to sell you log4net as the logging 
framework that works for you. It is (probably) your task to find a 
solution that works for you. That said, I usually implement a logging 
facade in every project unless the project is too small or short-lived. 
This allows us to decouple the application from third party dependencies 
and increases maintainability. Until now we never had to change the 
logging framework but nobody can predict the future and it is better to 
have yet another layer of abstraction than having to refactor thousands 
of logging statements anytime in the future.


Beside that, what kind of feedback do you expect? I will gladly answer 
your questions.


Best regards

Dominik


On 03/10/2016 04:21, Nicholas Duane wrote:
>
> Just curious if anyone has any feedback?  One reason I ask is because 
> I again just got an email from someone in my group and it's in 
> reference to the COE (Center Of Excellence) team wanting to recommend 
> nlog for the enterprise for logging on Windows/.NET.
>
>
> Thanks,
>
> Nick
>
>
> ------------------------------------------------------------------------
> *From:* Nicholas Duane <ni...@msn.com>
> *Sent:* Tuesday, September 20, 2016 10:03 AM
> *To:* log4net-user@logging.apache.org
> *Subject:* Re: Apache log4net Needs Help
>
> Maybe a bit of history would help.
>
>
> We had written our own logging framework a while back, prior to the 
> launch of .NET.  It was a Windows only framework which under the 
> covers used ETW (Event Trace for Windows), a very high performance 
> logging mechanism which is used by the Windows kernel and other 
> Microsoft products, like SQL Server.  Shortly after .NET was launched 
> we created a managed interface for that.  That was running fine for 
> 10+ years and is still running fine.
>
>
> More recently we had the need to capture a specific type of event 
> across many application in the enterprise.  While we could have 
> attempted to use our existing logging framework we would have needed 
> to extend it for a couple reasons:
>
>
> 1. It was a Windows only framework and we would need to support both 
> Windows and Java, the majority of Java applications running on Linux.
>
>
> 2.  It currently exposed a fixed set of events that could be raised.  
> This new event would have to be added to the fixed set or we would 
> have had to open up the API and allow the consumer to specify their 
> own schema.
>
>
> 3. It captured the events in a relational database.  We want to route 
> this new event to an HDFS backend.
>
>
> We decided to look at off the shelf logging frameworks instead of 
> creating one of our own.  While there are several logging frameworks 
> on the java side, log4j/log4j2 appeared to be the clear winner.  On 
> the .NET side there was no "clear" winner.  We looked at 
> System.Diagnostics (the logging/tracing classes provided by .NET), 
> nlog, log4net and Enterprise Logging (the application block).  From 
> that list only nlog and log4net were viable options.  One of the major 
> issues people had with log4net was the fact that it appeared it had 
> been abandoned, which I guess it was.  The 1.2.13 release had been out 
> for more than 2 years I think.  In fact, our .NET Center of Excellence 
> team was recommending nlog for .NET and I think one of the main 
> reasons for that was the lack of development on log4net.
>
>
> There were a few things I liked about log4net.
>
>
> * The fact that it was a port of log4j I saw as a benefit.  If I'm 
> looking for a logging framework for both .net and java and I can get 
> the same framework that works on both that's ideal.  It means both 
> would roughly have the same or similar API and features.  Ideally the 
> configuration is the same or similar for both.
>
>
> * I'm pretty sure I looked over the nlog api and didn't like it as 
> much as the log4net api.
>
>
> * I also liked, and thought was a key feature, the "logger" 
> inheritance feature of both log4net and log4j(2).
>
>
> Thanks,
>
> Nick
>
>
> ------------------------------------------------------------------------
> *From:* Dominik Psenner <dp...@gmail.com>
> *Sent:* Tuesday, September 20, 2016 2:26 AM
> *To:* log4net-user@logging.apache.org
> *Subject:* Re: Apache log4net Needs Help
>
> That's an interesting point. Would you mind to share your thoughts and 
> reasons why you picked log4net over other logging frameworks beyond 
> being a log4j port?
>
>
> On 2016-09-20 01:30, Nicholas Duane wrote:
>>
>> I can understand the breaking changes thing, but my impression is 
>> that straying from the log4j design is a bad idea.  What I think 
>> would be ideal is an apache logging architecture/design and then 
>> ports to java, log4j, and .NET, log4net.  One of the big benefits I 
>> see is having "relatively" the same logging framework run on both 
>> major platforms.
>>
>>
>> The one reason we picked log4net is because we chose lo4j2 on java.  
>> And having similar design was a benefit.  If we evaluated log4net on 
>> its own I'm not sure we would have picked it.
>>
>>
>> Thanks,
>>
>> Nick
>>
>> ------------------------------------------------------------------------
>> *From:* Walden H. Leverich <wa...@techsoftinc.com>
>> *Sent:* Monday, September 19, 2016 3:49 PM
>> *To:* Log4NET User
>> *Subject:* RE: Apache log4net Needs Help
>>
>> >Any chance that we'll get a log4net version which is a "port" of the 
>> latest log4j2?
>>
>> Maybe this is a discussion for the dev list, and granted I havent 
>> looked at what the changes are in log4j2, but my gut reaction is that 
>> a new port might be a bad idea. Yes, log4net started as a port of 
>> log4j (or at least thats my understanding) but its a mature logging 
>> framework in its own right today with a huge user base and numerous 
>> production deployments. A new port sounds to me like its 
>> synonymous with breaking changes and thats a colossally bad idea.
>>
>> Are there things we can learn from the latest log4j2? Of course there 
>> are. Maybe there should be a log4net2 project? I dont know. But 
>> whatever the evolution is of log4net it needs to be something that 
>> isnt so revolutionary as to cause me to reevaluate my logging 
>> infrastructure.
>>
>> -Walden
>>
>> -- 
>> Walden H Leverich III
>> (516) 627-3800 x3051
>> WaldenL@TechSoftInc.com <ma...@TechSoftInc.com>
>>
>> *From:*Nicholas Duane [mailto:nickdu@msn.com]
>> *Sent:* Wednesday, September 14, 2016 9:19 AM
>> *To:* Log4NET User <lo...@logging.apache.org>
>> *Subject:* Re: Apache log4net Needs Help
>>
>> I had asked about this in the past and I figured I would ask again 
>> after seeing this mail.  Any chance that we'll get a log4net version 
>> which is a "port" of the latest log4j2?
>>
>> Thanks,
>>
>> Nick
>>
>> ------------------------------------------------------------------------
>>
>> *From:*Stefan Bodewig <bodewig@apache.org <ma...@apache.org>>
>> *Sent:* Wednesday, September 14, 2016 12:32 AM
>> *To:* Log4NET User
>> *Subject:* Re: Apache log4net Needs Help
>>
>> Welcome!
>>
>> even though the official build system currently is NAnt, development
>> with your setup is supposed to work (if it doesn't, it is a bug).
>>
>> The first thing you should do is to join the log4net-dev mailing list.
>>
>> I think we need help in virtually any area - fixing bug, discussing
>> changes, documentation, testing ... you name it.
>>
>> In general you pick what you want to work on, nobody is going to assign
>> work to anybody else. We are all doing this in our spare time and it is
>> supposed to be fun :-)
>>
>> You may want to take a look at the JIRA issues to see whether you find
>> anything you'd like to work on. You know better than anybody else where
>> you can use your talent best - and what would be interesting to you.
>>
>> Cheers
>>
>>         Stefan
>>
>> On 2016-09-13, Shivinder Singh wrote:
>>
>> > Hello,
>> > I use log4net too, but in Windows/IIS/Visual Studio environment. If 
>> there is anything I can do let me know.
>>
>> > Thanks,
>> > Shivinder Singh
>> >> 1-409-330-3608
>> > shivindersingh@hotmail.com <ma...@hotmail.com>
>>
>>
>> >> From: bodewig@apache.org <ma...@apache.org>
>> >> To: log4net-dev@logging.apache.org 
>> <ma...@logging.apache.org>
>> >> Subject: Apache log4net Needs Help
>> >> CC: log4net-user@logging.apache.org 
>> <ma...@logging.apache.org>; general@logging.apache.org 
>> <ma...@logging.apache.org>; dev@lucenenet.apache.org 
>> <ma...@lucenenet.apache.org>
>> >> Date: Tue, 6 Sep 2016 06:12:19 +0200
>>
>> >> This is a general call-to-arms for everyone who uses log4net as their
>> >> logging solution. If log4net is the logging framework that you are
>> >> using and would like to keep using in the future it is time now to get
>> >> involved. The project needs a larger developing community to move on!
>> >> We really need more people who want to shape the future of log4net at
>> >> the Apache Software Foundation.
>>
>> >> In all the time since log4net has been started by Nicko Cadell more
>> >> than ten years ago, there have never been more than two or three
>> >> people regularly contributing to it. As is normal in open source
>> >> projects people have come and gone when their interests or just the
>> >> amount of time they could invest have changed.
>>
>> >> At the moment Dominik Psenner and Stefan Bodewig are the only people
>> >> semi-actively working on log4net and neither of them is able to devote
>> >> as much time to the project as they'd like to and as would be
>> >> required.
>>
>> >> Realistically log4net is maintenance mode where development of new
>> >> features is not going to happen.
>>
>> >> This has repeatedly made log4net lag behind recent developments in the
>> >> .NET world. It took a long time to get a version out that properly
>> >> worked with .NET 4.0 in 2011 and adaptions to .NET 4.5 also took much
>> >> longer than many users would have wished. We are seeing it again with
>> >> .NET Core right now. In addition there are many unresolved issues in
>> >> log4net's JIRA.
>>
>> >> Despite this there are more than 2500 downloads of the logging
>> >> framework every day from nuget. We are asking you, the log4net
>> >> community, to get your hands dirty.
>>
>> >> Right now we are in the process of creating a log4net release that
>> >> works for .NET Core. It is a very targeted effort and it is very
>> >> unlikely Dominik and Stefan will be able to contribute more in the
>> >> future than we did during the past months.
>>
>> >> If you are willing to help, please join log4net's dev mailing list and
>> >> raise your hand. Look through log4net's issue tracker and pick things
>> >> you'd like to work on. If you don't know where to start, please ask,
>> >> Dominik and Stefan will be there to help.
>>
>> >> If there is anything holding you back from contributing, let's discuss
>> >> it and get it out of the way. Nothing is carved into stone, neither
>> >> what the future of log4net holds nor how we make it happen.
>>
>> >> Links
>>
>> >> log4net's JIRA: https://issues.apache.org/jira/browse/LOG4NET
>>
>> Log4net - ASF JIRA - issues.apache.org 
>> <https://issues.apache.org/jira/browse/LOG4NET>
>>
>> issues.apache.org
>>
>> The Apache log4net library is a tool to help the programmer output 
>> log statements to a variety of output targets. log4net is a port of 
>> the excellent Apache log4j ...
>>
>>
>> >> dev mailing list: https://logging.apache.org/log4net/mail-lists.html
>> >> How the ASF works: https://www.apache.org/foundation/how-it-works.html
>> >> https://www.apache.org/dev/contributors.html
>>
>