There are multiple ways to do this.
1) just use log4j filters and logging levels. You can change this at runtime by modifying log4j.xml in the conf directory and JBoss should pick up the changes
2) Write an Message Drivent Bean interceptor. This is available in JBoss 3.2 or even JBoss 3.0.
Sounds like you just want to log messages that are posted to the Topic, correct? What you are doing sounds like the right solution.
P.S. Sorry for the late response, I have been away from email and web for 10 days.