Hi all,
I have scoured the net for this opinion, and I have come to the conclusion that many think log4j is the superior API. I therefore would like to hear the opinion of you guys here at bytes.
For me, I haven't done much logging but I have tried the Sun API and Log4j and I am starting to think Log4j is superior.
What do you guys think?
Regards,
Alex.
5 2691
Is your question about "which came first into existence"? Log4j was in existence in JDK 1.1 whereas java.util.logging was in place only since JDK 1.4.
The reference url says the same -> http://logging.apache.org/log4j/1.2/faq.html#1.3
If not, are you asking "which is the best?" -- they both are having their own ways of dealing with it.
Though log4j is being used by many people as it got many significant features which the other does NOT provide, it is a separate library from Apache, whereas java.util.logging has been implicit and internal to the JDK you use.No other library is required.
Is your question about "which came first into existence"? Log4j was in existence in JDK 1.1 whereas java.util.logging was in place only since JDK 1.4.
The reference url says the same -> http://logging.apache.org/log4j/1.2/faq.html#1.3
If not, are you asking "which is the best?" -- they both are having their own ways of dealing with it.
Though log4j is being used by many people as it got many significant features which the other does NOT provide, it is a separate library from Apache, whereas java.util.logging has been implicit and internal to the JDK you use.No other library is required.
I just wanted to get a comparison of the two APIs from members. Not exactly a "this is best" comparison. - Not a black and white kind of thing but just... Why would you choose one over the other? In the event you were asked to recommend?
Regards,
Alex.
JosAH 11,448
Recognized Expert MVP
I once picked Log4J over Sun's implementation for one reason: the RotatingFileAppender:
Sun's implementation didn't (and still doesn't) have it and I needed it and I was
too lazy to implement my own version.
kind regards,
Jos
I once picked Log4J over Sun's implementation for one reason: the RotatingFileAppender:
Sun's implementation didn't (and still doesn't) have it and I needed it and I was
too lazy to implement my own version.
kind regards,
Jos
I second it though I dint face the scenario !
I once picked Log4J over Sun's implementation for one reason: the RotatingFileAppender:
Sun's implementation didn't (and still doesn't) have it and I needed it and I was
too lazy to implement my own version.
kind regards,
Jos
Also I find the log Levels in log4j nicely intuitive. Those in sun's impl are not the best to deal with. For example deciding whether a given message is Level Fine, Finer, or Finest can be a pain. The level Debug in Log4j is well... Just that. DEBUG!
And Jos... I never thought Sun would be as lazy as you!!!! ;-)
Regards,
Alex.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Aaron Boxer |
last post by:
Hello,
My application is using a jar file MyJar.jar that uses log4j (I have the
latest release of log4j).
I have put both MyJar.jar and log4j.jar in a directory in my classpath. I
have also...
|
by: Greg Scharlemann |
last post by:
I have a various different packages within this web application that I
am writing and I am attempting to set up log4j to log directly to a
database. So each class is calling just a generic logger:...
|
by: Jan van Mansum |
last post by:
Hello group,
I have just been trying out the log4j library. As far as I understand
the idea is to keep the logging statements in your, even in the release
build. However, obviously you wouldn't...
|
by: BobReynolds |
last post by:
We use Log4j for all our logging, I want to know why we have to do the
following in EVERY class
final private static org.apache.log4j.Logger log =
LoggerUtil.getLogger(thisClassName.class);
...
|
by: sainiranji |
last post by:
Hi All
I have diffrent categories in diffrrent logging purpose and all are working fine...but now my requirment is to disable all at once .
The below are change i did for disable all logges...
| |
by: rsrinivasan |
last post by:
Hi,
I am using log4j to create log message. I want to write the log message to database. So i configured the log4j.properties files like this...
# Database Configuration...
|
by: Hari2349 |
last post by:
Regarding to log4j in java program..Plz help me...
--------------------------------------------------------------------------------
Hai,
friends i used the log4j.properties file like as...
|
by: Kedar Kachare |
last post by:
How to use Log4j to create log files using file appender in a Servlet? Also, how to make that Servlet read the log4j.properties file?
I have tried following:
My web.xml( I use Eclipse europa)...
|
by: Abhinay |
last post by:
Hi there,
I am working on server which used thread pool to process each client request by separate dedicated thread.
My intention was each thread ( of thread pool ) have its own logger and hence...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |