Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

a logging/trace lib for java

Thread view: 
frank - 16 Jun 2005 16:41 GMT
I was wondering if anyone had or knew of a basic java class/lib to do
tracing/logging of a java program.  All I'm looking to do is have a
utility class I guess to replace plain old System.out.println()(save to
a file probably instead) calls in the code. To be able to turn it on or
off and maybe have different levels of logging also.  Seems like this is
something others would also need so I thought I would ask before I tried
to build it myself.

Thanks,

Frank
TechBookReport - 16 Jun 2005 17:08 GMT
> I was wondering if anyone had or knew of a basic java class/lib to do
> tracing/logging of a java program.  All I'm looking to do is have a
[quoted text clipped - 7 lines]
>
> Frank

Two places to look at. The first is the Jakarta Commons Logging project
(http://jakarta.apache.org/commons/logging/). The second is Log4J, also
an apache project (http://logging.apache.org/log4j/docs/).

An even lower tech approach is to point System.out to a file...

HTH
=========================================================================
TechBookReport Java        http://www.techbookreport.com/JavaIndex.html
Vova Reznik - 16 Jun 2005 17:15 GMT
> I was wondering if anyone had or knew of a basic java class/lib to do
> tracing/logging of a java program.  All I'm looking to do is have a
[quoted text clipped - 7 lines]
>
> Frank

package java.util.logging
Roland - 16 Jun 2005 17:18 GMT
> I was wondering if anyone had or knew of a basic java class/lib to do
> tracing/logging of a java program.  All I'm looking to do is have a
[quoted text clipped - 7 lines]
>
> Frank

A third possibility is Java's own logging system (available for Java 1.4
and later)
<http://java.sun.com/j2se/1.5.0/docs/api/java/util/logging/package-summary.html>
<http://java.sun.com/j2se/1.5.0/docs/guide/logging/index.html>
Signature

Regards,

Roland de Ruiter
` ___      ___
`/__/ w_/ /__/
/  \ /_/ /  \

Simon OUALID - 16 Jun 2005 18:34 GMT
> A third possibility is Java's own logging system (available for Java 1.4
> and later)
> <http://java.sun.com/j2se/1.5.0/docs/api/java/util/logging/package-summary.html>
>
> <http://java.sun.com/j2se/1.5.0/docs/guide/logging/index.html>

log4j is nice too, but you'll need an extra jar :
http://logging.apache.org/log4j/docs/index.html
Roland - 16 Jun 2005 20:19 GMT
>> A third possibility is Java's own logging system (available for Java
>> 1.4 and later)
[quoted text clipped - 4 lines]
> log4j is nice too, but you'll need an extra jar :
> http://logging.apache.org/log4j/docs/index.html
Yep, it contains implementations for several output destinations, such
as SMTP (email), NT eventlog, Unix syslog.
If only logging to a file is required, Java logging would suffice (log4j
also supports logging to a file, of course).
Signature

Regards,

Roland de Ruiter
` ___      ___
`/__/ w_/ /__/
/  \ /_/ /  \

Lucy - 16 Jun 2005 19:00 GMT
> > I was wondering if anyone had or knew of a basic java class/lib to do
> > tracing/logging of a java program.  All I'm looking to do is have a
[quoted text clipped - 3 lines]
> > something others would also need so I thought I would ask before I tried
> > to build it myself.

There is a program called "trace" that you can use. It prints out whenever
you enter or leave a method.
Roland - 16 Jun 2005 20:20 GMT
>>>I was wondering if anyone had or knew of a basic java class/lib to do
>>>tracing/logging of a java program.  All I'm looking to do is have a
[quoted text clipped - 6 lines]
> There is a program called "trace" that you can use. It prints out whenever
> you enter or leave a method.
Where would I find this program. Do you perhaps have a URL.
Signature

Regards,

Roland de Ruiter
` ___      ___
`/__/ w_/ /__/
/  \ /_/ /  \

Lucy - 17 Jun 2005 00:19 GMT
> >>>I was wondering if anyone had or knew of a basic java class/lib to do
> >>>tracing/logging of a java program.  All I'm looking to do is have a
[quoted text clipped - 9 lines]
> --
> Regards

www.jmonde.org
but when you click on it, it goes immedately to
http://www.geocities.com/mcphailmj/

On-the-fly runtime method tracing for Java applications

Synopsis
   org.jmonde.debug.Trace [ options ] class [ argument ... ]


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.