Hi, Whilst fixing a bug[1] I wanted to log an error message. I've realised that I'm not clear on Tuscany's policy on how this should be done.
I've had a look through the developer guides [2] and [3] (we have more than 1?) but neither mention anything about logging. To narrow the scope of this question a little bit, I am not talking about tracing execution (method entry/exit). I am talking about logging runtime errors. Having a scan through the Developer Mailing List, I could not find anything conclusive on the subject. There was a discussion in August 2007 [4] that seems to suggest the use of AOP and JDK Logging although no formal decision seems to have been made. Looking through the code, there appears to be a few strategies for logging: *) Don't do any logging *) Log to the Console - e.g. e.printStackTrace() *) Use JDK logging. The scenario I ran into in the bug [1] was that a @OneWay invocation has thrown a RuntimeException (e.g. NullPointerException). The original invoking client is no longer around as a new Thread has been used to invoke the @OneWay operation. The exception could just ripple up through and "kill" the thread but this is not very nice. What I want to do is log the Exception so the fact it happened can be recorded in a log. >From a personal perspective, I think we could consider using something like SL4J [5]. Tuscany is very likely to be integrated into other applications/containers (e.g. Tomcat, WebSphere, etc) so SL4J would allow the same Tuscany logging code to use different logging back ends (e.g. log4j, JDK Logging, console, etc) depending on the environment in which it is running. So .... (takes a step back as he fears he might be opening a can of worms).... what is the general opinion on how logging should be done in Tuscany? Thanks, Mark [1] https://issues.apache.org/jira/browse/TUSCANY-2225 [2] http://cwiki.apache.org/TUSCANY/sca-java-development.html [3] http://cwiki.apache.org/TUSCANY/java-sca-developer-guide.html [4] http://www.mail-archive.com/tuscany-dev@ws.apache.org/msg21735.html [5] http://www.slf4j.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]