You can accomplish asynchronous logging in either one of two ways: put messages into a queue then read and log them from a separate thread; or use JMS. If you are using EJB, you might want to try JMS; Sun's J2EE specification frowns on using java.io... in EJB's. If you're looking for a really good existing logging API, try:
. The authors have made every effort to make the log fast and give recommendations for using it to maximize performance. It includes an async adapter too.