logging url of source

K

kazazic

Hi ,

I am using tomcat 5.5 with log4j to log my errors, and it works great,
but it would be of great help if I could get information about URL of
errror, this way I could reproduce it and remove much faster, I want
to have this code on a single place and not for every exception in
application

Using errorpage wont work anyhow (as it throws invalidStateExeption or
something similar).

I have my own exceptions which are used through whole application as
well a single place to call log.fatal and other logger methods, and
this is only place where I could put code in single place and use it
through whole application. What I would like to have is something like
tomcat.Context.getCurrentContext().getUrl, or something like that,
where I could, by using some static methods get to context or similar
objects which could tell me about my location.


thanks
almir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top