RE: log4j vs jdk 1.4 logging
Hi, So a couple of points... 1) I prefer log4j. From the time I first downloaded it, it was very easy to set up, use, and re-configure (at both design and run time, including on very large scale production systems). The DailyRollingFileAppender works great for me ;) I like that it's free, light, and high performance. I don't think the JDK1.4 logging API can possibly be high performance at this point, as it can't have been tested on many production systems yet. (Yes, I'm one of those people who believe that to be rock-solid, something needs to have a bit of maturity behind it ;)) 2) Regarding Jakarta-commons: I've tried it and made it work. However, one caution that I try to keep in mind when adding an interface layer that will accept many (typically, 200-300/minute in some of our systems, including a lot of isDebugEnabled() type calls) is that on some systems, calling an interface method is up to 6x slower than calling the same method on a regular class. I don't remember where I saw this number, but it was an official benchmark from either Sun or IBM, and I was able to confirm it on my own system. I think the above (#2) might be part of the reason these APIs are not an interface, and that's the reason we don't use Jakarta-commons. If we were a lower-throughput system, I'd definitely be stronger biased towards it, but this is a conscious performance-oriented decision we've made. Just my due centi, Yoav Shapira -Original Message- From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 11:41 PM To: Log4J Users List; Steve Cohen Subject: RE: log4j vs jdk 1.4 logging i would strongly suggest that you switch your application to using the logging interface in the jakarta commons package. then, you are free to plug in either log4j or jdk1.4. the great flaw of both of these packages is that they were not coded from an interface, and the interface they offer is what is hardcoded into their classes. HTH --e-- On Wed, 10 Apr 2002 18:05:50 -0500, Steve Cohen wrote: I am in the position of recommending a switch to either log4j or jdk 1.4 from a roll-your-own system that has outgrown its original usefulness. -- Edward Q. Bridges http://www.teachscape.com -- To unsubscribe, e-mail: mailto:log4j-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:log4j-user- [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: log4j vs jdk 1.4 logging
Will the log4j adapter in the commons logging package work with version 1.2b3eta 4 of log4j or does it only work with 1.1.3, or does it not matter? - Steve Cohen Sr. Software Engineer Ignite Sports, Inc. [EMAIL PROTECTED] -Original Message- From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 10:41 PM To: Log4J Users List; Steve Cohen Subject: RE: log4j vs jdk 1.4 logging i would strongly suggest that you switch your application to using the logging interface in the jakarta commons package. then, you are free to plug in either log4j or jdk1.4. the great flaw of both of these packages is that they were not coded from an interface, and the interface they offer is what is hardcoded into their classes. HTH --e-- On Wed, 10 Apr 2002 18:05:50 -0500, Steve Cohen wrote: I am in the position of recommending a switch to either log4j or jdk 1.4 from a roll-your-own system that has outgrown its original usefulness. -- Edward Q. Bridges http://www.teachscape.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: log4j vs jdk 1.4 logging
i'm not familiar enough with the differences between 1.2b3 and 1.1.3 to answer that. the site for the logging package is here: http://jakarta.apache.org/commons/logging.html perhaps someone with more familiarity can answer this?? regards --e-- On Thu, 11 Apr 2002 09:41:04 -0500, Steve Cohen wrote: Will the log4j adapter in the commons logging package work with version 1.2b3eta 4 of log4j or does it only work with 1.1.3, or does it not matter? - Steve Cohen Sr. Software Engineer Ignite Sports, Inc. [EMAIL PROTECTED] -Original Message- From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 10:41 PM To: Log4J Users List; Steve Cohen Subject: RE: log4j vs jdk 1.4 logging i would strongly suggest that you switch your application to using the logging interface in the jakarta commons package. then, you are free to plug in either log4j or jdk1.4. the great flaw of both of these packages is that they were not coded from an interface, and the interface they offer is what is hardcoded into their classes. HTH --e-- On Wed, 10 Apr 2002 18:05:50 -0500, Steve Cohen wrote: I am in the position of recommending a switch to either log4j or jdk 1.4 from a roll-your-own system that has outgrown its original usefulness. -- Edward Q. Bridges http://www.teachscape.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Edward Q. Bridges http://www.teachscape.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: log4j vs jdk 1.4 logging
I should not have said that it does not support log 4j 1.2. It uses the Category mechanism and it does provide wrapper around the debug, info and other useful methods too. Sorry for the confusion. Swami -Original Message- From: Mark Womack [mailto:[EMAIL PROTECTED]] Sent: April 11, 2002 1:06 PM To: 'Log4J Users List' Subject: RE: log4j vs jdk 1.4 logging I find this curious since 1.2 is supposed to be backward compatible with 1.1.3. Does the wrapper use some deprecated methods or something? I'm sure it uses the Category class (which is migrating to the Logger class in 1.2), but that class is still available in 1.2. I haven't used the commons wrapper, but I did look at it fairly closely. Didn't seem heavy enough to become incompatible. Maybe I missed something. -Mark -Original Message- From: Swami Iyer [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 9:28 AM To: 'Log4J Users List'; Edward Q. Bridges Subject: RE: log4j vs jdk 1.4 logging The commons-logging will support log4j 1.1.3 and not log4j 1.2. If you download the api, they have a wrapper which act as the factory framework. For log4j 1.2 a new wrapper need to be written. Swami -Original Message- From: Steve Cohen [mailto:[EMAIL PROTECTED]] Sent: April 11, 2002 12:10 PM To: Edward Q. Bridges; Log4J Users List Subject: RE: log4j vs jdk 1.4 logging BTW, I couldn't find that information in the Commons documentation. -Original Message- From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 11, 2002 11:10 AM To: Log4J Users List; Steve Cohen Subject: RE: log4j vs jdk 1.4 logging i'm not familiar enough with the differences between 1.2b3 and 1.1.3 to answer that. the site for the logging package is here: http://jakarta.apache.org/commons/logging.html perhaps someone with more familiarity can answer this?? regards --e-- On Thu, 11 Apr 2002 09:41:04 -0500, Steve Cohen wrote: Will the log4j adapter in the commons logging package work with version 1.2b3eta 4 of log4j or does it only work with 1.1.3, or does it not matter? - Steve Cohen Sr. Software Engineer Ignite Sports, Inc. [EMAIL PROTECTED] -Original Message- From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 10:41 PM To: Log4J Users List; Steve Cohen Subject: RE: log4j vs jdk 1.4 logging i would strongly suggest that you switch your application to using the logging interface in the jakarta commons package. then, you are free to plug in either log4j or jdk1.4. the great flaw of both of these packages is that they were not coded from an interface, and the interface they offer is what is hardcoded into their classes. HTH --e-- On Wed, 10 Apr 2002 18:05:50 -0500, Steve Cohen wrote: I am in the position of recommending a switch to either log4j or jdk 1.4 from a roll-your-own system that has outgrown its original usefulness. -- Edward Q. Bridges http://www.teachscape.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Edward Q. Bridges http://www.teachscape.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: log4j vs jdk 1.4 logging
Google is your friend: http://www.google.com/search?q=log4j+vs+1.4 http://jakarta.apache.org/log4j/docs/critique.html http://jakarta.apache.org/log4j/docs/critique2.html Cheers, Scott Steve Cohen wrote: I am in the position of recommending the adoption of either something like log4j or the jdk 1.4 logging classes to replace a home-grown logging system that has seen better days. Can someone point me at an article comparing log4j to jdk1.4 java.util.logging? Or failing that, give me their opinion on the pros and cons of each? - Steve Cohen Sr. Software Engineer Ignite Sports, Inc. [EMAIL PROTECTED] -- Scott Farquhar :: [EMAIL PROTECTED] Atlassian :: http://www.atlassian.com Supporting YOUR J2EE World -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: log4j vs jdk 1.4 logging
Sorry about the duplication. (Yeah, I know, now I've compounded the error). I joined the list, tried the first post, never heard back, reread the welcome and figured my message wasn't published because I hadn't confirmed. So I confirmed, rewrote message and was then surprised to find my original message published. Oh well. -Original Message- From: Steve Cohen Sent: Wednesday, April 10, 2002 5:52 PM To: [EMAIL PROTECTED] Subject: log4j vs jdk 1.4 logging I am in the position of recommending a switch to either log4j or jdk 1.4 from a roll-your-own system that has outgrown its original usefulness. Can anyone make recommendations to me either way about which way I should go? Unlike some of the remarks I've read in the archives, I have no existing investment either way to take into account. - Steve Cohen Sr. Software Engineer Ignite Sports, Inc. [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: log4j vs jdk 1.4 logging
I am in the position of recommending a switch to either log4j or jdk 1.4 from a roll-your-own system that has outgrown its original usefulness. I would go for log4j... but thn you are asking in the wrong place IMHO. This is a log4j user list... I am guessing this makes most of us biased towards log4j (at least I am biased. I think log4j is a great logging api, it does everything I want and much more, it is open source and apache licensed, and is activeley developed. What more do you want?). Regards, Ylan Segal. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: log4j vs jdk 1.4 logging
Granted there will be bias here. But the big guy often takes no notice of the little guy so the discussion tends to be one sided anyway. I doubt there's a pro-sun logging site anywhere that is as interested as pointing out the weaknesses of log4j as the reverse. They don't have to care. They're Sun. I guess what I'm trying to figure out if the JDK 1.4 is going to sweep the field regardless of quality and how important that would be to me. My working example is jgl. The Sun classes had fewer capabilities than jgl. Just recently I had to use jgl to get duplicate-value-per-key hashmaps or something like that. On the other hand, the Sun classes could be favored on the basis of simplicity and consistency. They made a lot of use of interfaces. So did Sun sweep the field because of or in spite of quality? From what little I've read, it seems that Sun could make the quality argument a little more strongly with the Collection classes than it can here. Or is the difference that log4j has a stronger open-source team behind it than jgl did? -Original Message- From: Ylan Segal [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 10, 2002 6:14 PM To: Log4J Users List Subject: RE: log4j vs jdk 1.4 logging I am in the position of recommending a switch to either log4j or jdk 1.4 from a roll-your-own system that has outgrown its original usefulness. I would go for log4j... but thn you are asking in the wrong place IMHO. This is a log4j user list... I am guessing this makes most of us biased towards log4j (at least I am biased. I think log4j is a great logging api, it does everything I want and much more, it is open source and apache licensed, and is activeley developed. What more do you want?). Regards, Ylan Segal. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: log4j vs jdk 1.4 logging
Steve, I am one of the biased ones, as you may have noticed in the archives. I started using log4j before I knew about the 1.4 logging api. At the time, log4j was the clear winner due to: - Design. It is one of the most flexible, configurable logging tools I have seen. - Extensibility. It is very easy to extend log4j in many different ways, depending on your needs. - Support. While not all questions posted to the log4j-user list get answered, many of them do and there is a fairly active group of developers using, extending, and sharing their log4j experiences. - Open Source. Got a problem or bug? Need to do something beyond the normal extensions? Take a crack at it yourself. People submit new stuff/ideas all the time that they feel make log4j more useful; many of them get incorporated. - License. Tha Apache license is critical to my company using log4j, but that is not much of an issue against the 1.4 logging api. - Evolution. Because it is open source, has an active community, and is not tied to any big JSR review process, I feel that log4j has the advantage of being able to evolve and adapt to better suit developer's needs. Look how long it took Sun to get around to the logging api to begin with. Do we really expect there will be lots of changes or extensions to make things better in the future? I don't. The logging api can't be a big priority at Sun, say compared to EJB's or the Servlet API. I don't believe it is going to be given a lot of resources for future work. After we started using log4j, JSR047 (1.4 logging api) became big news. I have not tried to use it extensively, so I cannot comment from a lot of direct experience. But my impression from what I have read (from Ceki and other third parties), it seems like a very exact cut from the log4j api. Take that as you may, I think it says that log4j is the right tool to begin with. With the above reasons, I still believe that log4j is superior and will continue to be so in the future. Will it be swept away because the 1.4 logging api's will become an easy standard to follow? Maybe. I hope not. But I don't see any reason why one can't just pick the right tool for the job. All that said, I must put in the caveat that we chose to wrap the log4j api's instead of using them in our code directly. There are lots of pros and cons to doing this, but we felt that being able to change the underlying logging package without requiring changes to the calling client code was a critical requirement. I don't want to change a gazillion source files if this (unlikely) decision is made. So, the client code is protected by an abstract wrapper. Our wrapper api is such that we could switch to an implementation using the 1.4 logging api if we wanted to. We haven't wanted to, but one must face the reality that things (and requirements) change; where you can, be ready to bend. If you look in the jakarta-commons area, you will find an logging wrapper api for many different logging packages. I love using log4j because I am able to do what I want without requiring the complete reinvention of the wheel. Because it is a more mature api than the 1.4 logging api, chances are there are classes off the shelf that I can use to do what I want. If not, there are lots of examples to use to create classes to my specific needs. A recent example comes from my recent discovery and use of the Chainsaw client (written by Oliver Burns, a client that can be configured to display logging messages from a remote source). The SocketAppender that was used to send log events to the client was not flexible enough for our development environment. I went home and wrote a new version in one night that supports multiple clients on a single appender. I submitted this new appender to the log4j-dev list, and it has been accepted as SocketHubAppender and will be included in the 1.2 release. Chainsaw itself has been accepted into the log4j project and will be available and extended in future releases as well (and with a recent post regarding LogFactor5, another client that sounds very mature, it just gets potentially better). I was able to configure and use all of this stuff without any changes to my client code (which would have been the case even without the wrapper). New functionality without changing my code. Very cool. Now, to be fair to the 1.4 logging api, it is extensible as well, so you can probably do many of the same things. For example, another logging client, Lumbermill, plans to support remote viewing of 1.4 log events. But I would be required to recreate too many of the classes that are already in log4j. Plus, what group is going to support and share new classes? The 1.4 logging api might get there someday, but log4j is already here. Anyway, like I said, I am biased, but biased because I have found log4j to be so incredibly useful. hope it helps your decision, -Mark -Original Message- From: Steve Cohen [mailto:[EMAIL PROTECTED]] Sent:
RE: log4j vs jdk 1.4 logging
i would strongly suggest that you switch your application to using the logging interface in the jakarta commons package. then, you are free to plug in either log4j or jdk1.4. the great flaw of both of these packages is that they were not coded from an interface, and the interface they offer is what is hardcoded into their classes. HTH --e-- On Wed, 10 Apr 2002 18:05:50 -0500, Steve Cohen wrote: I am in the position of recommending a switch to either log4j or jdk 1.4 from a roll-your-own system that has outgrown its original usefulness. -- Edward Q. Bridges http://www.teachscape.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]