Article View: borland.public.jbuilder.java.api
Article #33Re: method calls logging
From: Victor Ceban
Date: Wed, 19 Jan 2005 14:16
Date: Wed, 19 Jan 2005 14:16
53 lines
3228 bytes
3228 bytes
Both this solutions require code to be altered (all methods) to show the debugging information. What I was looking for is more of an adapter/Listener that logs when my application enters a method in any class and leaves that method in that class. Any suggestions ? Victor "Paul Nichols (TeamB)" <paul@comp.net> wrote in message news:41edc04c@newsgroups.borland.com... > > "Victor Ceban" <vceban@eei1.com> wrote in message > news:41ed63d6$1@newsgroups.borland.com... >> Hi, >> >> we have a complex J2EE application that runs on Tomcat 5/Linux and uses >> struts heavily. We also have a couple extra libraries used in the system. >> >> The system started to crash on the server and it crashes JVM with no > useful >> information written to the log file. >> >> I was wondering if there is a mechanism to track all method calls sent >> to >> Java for us to identify which method crashes the system. We would like to >> avoid adding logging methods to every method: methodIn, methodOut and >> time >> (may be). Any JVM triggers we can use ? additional libraries ? >> > Two ways, youmight go about this, but it will drag the response time from > the server. > > (1) Use debugging with log4j. This will dump to your log4j files the full > stack trace from the running application. > > (2) Start your catalina session with the debug option. You will need to > start the catalina.sh or .bat file in a local terminal and this too will > produce a stack trace of output. Unless you want to monitor all activity, > I > would suggest redirecting this info to a file. > > > Info on log4j: http://logging.apache.org/log4j/docs/documentation.html > > Info on Catalina debugging: > http://www.fawcette.com/javapro/2003%5F06/online/debugging%5Fkjones%5F06%5F23%5F03/ > Look toward the bottom for command line info on using the debug mode. > > Again, expect your app to slow down dramatically, as the stack trace goes > through class loaders and methods.. > > > >
Technical Details
Message-ID:
<41ee6b3b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!spool-3.news.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.multikabel.nl!lightspeed.eweka.nl!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<41ed63d6$1@newsgroups.borland.com> <41edc04c@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1089d0,a7b8d4ffc2d2f8a6 X-Google-Attributes: gid1089d0,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Victor Ceban" <vceban@eei1.com> Newsgroups: borland.public.jbuilder.java.api References: <41ed63d6$1@newsgroups.borland.com> <41edc04c@newsgroups.borland.com> Subject: Re: method calls logging Date: Wed, 19 Jan 2005 09:16:33 -0500 Lines: 55 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 65.207.44.48 Message-ID: <41ee6b3b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1106144059 65.207.44.48 (19 Jan 2005 06:14:19 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!spool-3.news.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.multikabel.nl!lightspeed.eweka.nl!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail