You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Ajay <aj...@ocimumbio.com> on 2004/02/19 12:30:04 UTC

Catching Exceptions through Log4j

Hi all,
    First things first HI Everybody. I am new to this group and for logging otherthan using SOPs. I have a small question before actually start using it. Will log4j prints catched and uncatched exceptions. If yes at what level they will be in.

Thanks,
Ajay Kumar.G
Bioinformatics Specialist
Ocimum Biosolutions
404 Reliance Classic
Road no 1 Banjara Hills
Hyderabad 500034
 
(www.ocimumbio.com)
Phone: (91)40-55627200
Fax: (91)40-55627205
*****************************************
Disclaimer: This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager at webmaster@ocimumbio.com . Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Ocimum. Finally, the recipient should check this email and any attachments for the presence of viruses. Ocimum accepts no liability for any damage caused by any virus transmitted by this email.

Re: Catching Exceptions through Log4j

Posted by Ajay <aj...@ocimumbio.com>.
Hi jake,
    Wow AOP looks great. I will look into that. Thanks alot
Regards,
Ajay Kumar.G
Bioinformatics Specialist
Ocimum Biosolutions
404 Reliance Classic
Road no 1 Banjara Hills
Hyderabad 500034

(www.ocimumbio.com)
Phone: (91)40-55627200
Fax: (91)40-55627205
*****************************************
Disclaimer: This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the system
manager at webmaster@ocimumbio.com . Please note that any views or opinions
presented in this email are solely those of the author and do not
necessarily represent those of Ocimum. Finally, the recipient should check
this email and any attachments for the presence of viruses. Ocimum accepts
no liability for any damage caused by any virus transmitted by this email.
----- Original Message -----
From: "Jacob Kjome" <ho...@visi.com>
To: "Log4J Users List" <lo...@logging.apache.org>
Sent: Friday, February 20, 2004 10:03 AM
Subject: Re: Catching Exceptions through Log4j


> If you are into AOP (Aspect Oriented Programming), you may be able to
> create an Aspect to do this for you.  I don't know enough about it to give
> you any explanation of how to use AOP, but you could take a look at a
> promising new AOP project based on dynamic proxies....
>
> https://dynaop.dev.java.net/
> http://weblogs.java.net/pub/wlg/1001
>
> Jake
>
> At 09:35 AM 2/20/2004 +0530, you wrote:
> >Hi Jake,
> >     Thanks alot jake. My application now exceeds 1 million lines of code
and
> >has so many printStacktraces in my application. I was searching for hack
if
> >I could log them magically. Yesterday I browsed for this in the archives
but
> >coudn't find any. Just to confirm my finding I posted it. Anyhow thanks a
> >lot. I will start looking for printStacktraces occurences and will
changes
> >them manually.
> >
> >Regards,
> >Ajay Kumar.G
> >Bioinformatics Specialist
> >Ocimum Biosolutions
> >404 Reliance Classic
> >Road no 1 Banjara Hills
> >Hyderabad 500034
> >
> >(www.ocimumbio.com)
> >Phone: (91)40-55627200
> >Fax: (91)40-55627205
> >*****************************************
> >Disclaimer: This email and any files transmitted with it are confidential
> >and intended solely for the use of the individual or entity to whom they
are
> >addressed. If you have received this email in error please notify the
system
> >manager at webmaster@ocimumbio.com . Please note that any views or
opinions
> >presented in this email are solely those of the author and do not
> >necessarily represent those of Ocimum. Finally, the recipient should
check
> >this email and any attachments for the presence of viruses. Ocimum
accepts
> >no liability for any damage caused by any virus transmitted by this
email.
> >----- Original Message -----
> >From: "Jacob Kjome" <ho...@visi.com>
> >To: "Log4J Users List" <lo...@logging.apache.org>
> >Sent: Friday, February 20, 2004 8:19 AM
> >Subject: Re: Catching Exceptions through Log4j
> >
> >
> > > At 05:00 PM 2/19/2004 +0530, you wrote:
> > > >Hi all,
> > > >     First things first HI Everybody. I am new to this group and for
> > > > logging otherthan using SOPs. I have a small question before
actually
> > > > start using it. Will log4j prints catched and uncatched exceptions.
If
> > > > yes at what level they will be in.
> > >
> > > Do you mean will Log4j provide some sort of magic to display
exceptions
> > > that happen?  Well, no.  You have to log the exception yourself, just
like
> > > anything else you log.
> > >
> > > logger.debug("Boom!  An exception", e);
> > >
> > > Log4j doesn't handle your exceptions for you, but provides a way to
view
> > > the ones you catch in a log.  Hope I didn't completely miss the point
on
> > > that one.  If I did, please re-explain what you are trying to get at.
> > >
> > > Jake
> > >
> > >
> > > >Thanks,
> > > >Ajay Kumar.G
> > > >Bioinformatics Specialist
> > > >Ocimum Biosolutions
> > > >404 Reliance Classic
> > > >Road no 1 Banjara Hills
> > > >Hyderabad 500034
> > > >
> > > >(www.ocimumbio.com)
> > > >Phone: (91)40-55627200
> > > >Fax: (91)40-55627205
> > > >*****************************************
> > > >Disclaimer: This email and any files transmitted with it are
confidential
> > > >and intended solely for the use of the individual or entity to whom
they
> > > >are addressed. If you have received this email in error please notify
the
> > > >system manager at webmaster@ocimumbio.com . Please note that any
views or
> > > >opinions presented in this email are solely those of the author and
do
> >not
> > > >necessarily represent those of Ocimum. Finally, the recipient should
> >check
> > > >this email and any attachments for the presence of viruses. Ocimum
> >accepts
> > > >no liability for any damage caused by any virus transmitted by this
> >email.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Catching Exceptions through Log4j

Posted by Jacob Kjome <ho...@visi.com>.
If you are into AOP (Aspect Oriented Programming), you may be able to 
create an Aspect to do this for you.  I don't know enough about it to give 
you any explanation of how to use AOP, but you could take a look at a 
promising new AOP project based on dynamic proxies....

https://dynaop.dev.java.net/
http://weblogs.java.net/pub/wlg/1001

Jake

At 09:35 AM 2/20/2004 +0530, you wrote:
>Hi Jake,
>     Thanks alot jake. My application now exceeds 1 million lines of code and
>has so many printStacktraces in my application. I was searching for hack if
>I could log them magically. Yesterday I browsed for this in the archives but
>coudn't find any. Just to confirm my finding I posted it. Anyhow thanks a
>lot. I will start looking for printStacktraces occurences and will changes
>them manually.
>
>Regards,
>Ajay Kumar.G
>Bioinformatics Specialist
>Ocimum Biosolutions
>404 Reliance Classic
>Road no 1 Banjara Hills
>Hyderabad 500034
>
>(www.ocimumbio.com)
>Phone: (91)40-55627200
>Fax: (91)40-55627205
>*****************************************
>Disclaimer: This email and any files transmitted with it are confidential
>and intended solely for the use of the individual or entity to whom they are
>addressed. If you have received this email in error please notify the system
>manager at webmaster@ocimumbio.com . Please note that any views or opinions
>presented in this email are solely those of the author and do not
>necessarily represent those of Ocimum. Finally, the recipient should check
>this email and any attachments for the presence of viruses. Ocimum accepts
>no liability for any damage caused by any virus transmitted by this email.
>----- Original Message -----
>From: "Jacob Kjome" <ho...@visi.com>
>To: "Log4J Users List" <lo...@logging.apache.org>
>Sent: Friday, February 20, 2004 8:19 AM
>Subject: Re: Catching Exceptions through Log4j
>
>
> > At 05:00 PM 2/19/2004 +0530, you wrote:
> > >Hi all,
> > >     First things first HI Everybody. I am new to this group and for
> > > logging otherthan using SOPs. I have a small question before actually
> > > start using it. Will log4j prints catched and uncatched exceptions. If
> > > yes at what level they will be in.
> >
> > Do you mean will Log4j provide some sort of magic to display exceptions
> > that happen?  Well, no.  You have to log the exception yourself, just like
> > anything else you log.
> >
> > logger.debug("Boom!  An exception", e);
> >
> > Log4j doesn't handle your exceptions for you, but provides a way to view
> > the ones you catch in a log.  Hope I didn't completely miss the point on
> > that one.  If I did, please re-explain what you are trying to get at.
> >
> > Jake
> >
> >
> > >Thanks,
> > >Ajay Kumar.G
> > >Bioinformatics Specialist
> > >Ocimum Biosolutions
> > >404 Reliance Classic
> > >Road no 1 Banjara Hills
> > >Hyderabad 500034
> > >
> > >(www.ocimumbio.com)
> > >Phone: (91)40-55627200
> > >Fax: (91)40-55627205
> > >*****************************************
> > >Disclaimer: This email and any files transmitted with it are confidential
> > >and intended solely for the use of the individual or entity to whom they
> > >are addressed. If you have received this email in error please notify the
> > >system manager at webmaster@ocimumbio.com . Please note that any views or
> > >opinions presented in this email are solely those of the author and do
>not
> > >necessarily represent those of Ocimum. Finally, the recipient should
>check
> > >this email and any attachments for the presence of viruses. Ocimum
>accepts
> > >no liability for any damage caused by any virus transmitted by this
>email.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Catching Exceptions through Log4j

Posted by Ajay <aj...@ocimumbio.com>.
Hi Jake,
    Thanks alot jake. My application now exceeds 1 million lines of code and
has so many printStacktraces in my application. I was searching for hack if
I could log them magically. Yesterday I browsed for this in the archives but
coudn't find any. Just to confirm my finding I posted it. Anyhow thanks a
lot. I will start looking for printStacktraces occurences and will changes
them manually.

Regards,
Ajay Kumar.G
Bioinformatics Specialist
Ocimum Biosolutions
404 Reliance Classic
Road no 1 Banjara Hills
Hyderabad 500034

(www.ocimumbio.com)
Phone: (91)40-55627200
Fax: (91)40-55627205
*****************************************
Disclaimer: This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the system
manager at webmaster@ocimumbio.com . Please note that any views or opinions
presented in this email are solely those of the author and do not
necessarily represent those of Ocimum. Finally, the recipient should check
this email and any attachments for the presence of viruses. Ocimum accepts
no liability for any damage caused by any virus transmitted by this email.
----- Original Message -----
From: "Jacob Kjome" <ho...@visi.com>
To: "Log4J Users List" <lo...@logging.apache.org>
Sent: Friday, February 20, 2004 8:19 AM
Subject: Re: Catching Exceptions through Log4j


> At 05:00 PM 2/19/2004 +0530, you wrote:
> >Hi all,
> >     First things first HI Everybody. I am new to this group and for
> > logging otherthan using SOPs. I have a small question before actually
> > start using it. Will log4j prints catched and uncatched exceptions. If
> > yes at what level they will be in.
>
> Do you mean will Log4j provide some sort of magic to display exceptions
> that happen?  Well, no.  You have to log the exception yourself, just like
> anything else you log.
>
> logger.debug("Boom!  An exception", e);
>
> Log4j doesn't handle your exceptions for you, but provides a way to view
> the ones you catch in a log.  Hope I didn't completely miss the point on
> that one.  If I did, please re-explain what you are trying to get at.
>
> Jake
>
>
> >Thanks,
> >Ajay Kumar.G
> >Bioinformatics Specialist
> >Ocimum Biosolutions
> >404 Reliance Classic
> >Road no 1 Banjara Hills
> >Hyderabad 500034
> >
> >(www.ocimumbio.com)
> >Phone: (91)40-55627200
> >Fax: (91)40-55627205
> >*****************************************
> >Disclaimer: This email and any files transmitted with it are confidential
> >and intended solely for the use of the individual or entity to whom they
> >are addressed. If you have received this email in error please notify the
> >system manager at webmaster@ocimumbio.com . Please note that any views or
> >opinions presented in this email are solely those of the author and do
not
> >necessarily represent those of Ocimum. Finally, the recipient should
check
> >this email and any attachments for the presence of viruses. Ocimum
accepts
> >no liability for any damage caused by any virus transmitted by this
email.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Catching Exceptions through Log4j

Posted by Jacob Kjome <ho...@visi.com>.
At 05:00 PM 2/19/2004 +0530, you wrote:
>Hi all,
>     First things first HI Everybody. I am new to this group and for 
> logging otherthan using SOPs. I have a small question before actually 
> start using it. Will log4j prints catched and uncatched exceptions. If 
> yes at what level they will be in.

Do you mean will Log4j provide some sort of magic to display exceptions 
that happen?  Well, no.  You have to log the exception yourself, just like 
anything else you log.

logger.debug("Boom!  An exception", e);

Log4j doesn't handle your exceptions for you, but provides a way to view 
the ones you catch in a log.  Hope I didn't completely miss the point on 
that one.  If I did, please re-explain what you are trying to get at.

Jake


>Thanks,
>Ajay Kumar.G
>Bioinformatics Specialist
>Ocimum Biosolutions
>404 Reliance Classic
>Road no 1 Banjara Hills
>Hyderabad 500034
>
>(www.ocimumbio.com)
>Phone: (91)40-55627200
>Fax: (91)40-55627205
>*****************************************
>Disclaimer: This email and any files transmitted with it are confidential 
>and intended solely for the use of the individual or entity to whom they 
>are addressed. If you have received this email in error please notify the 
>system manager at webmaster@ocimumbio.com . Please note that any views or 
>opinions presented in this email are solely those of the author and do not 
>necessarily represent those of Ocimum. Finally, the recipient should check 
>this email and any attachments for the presence of viruses. Ocimum accepts 
>no liability for any damage caused by any virus transmitted by this email.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org