I have a class with database calls, and I generally want to log every method called (with arguments) in this class with log4j:
logger.debug(\"foo(id=\"+id+\") in
One possible solution would be to use aspectj. Idea would be to attach aspect to every method you wish to log, and perform logging is aspect instead of a method. One example of aspectj logging is right here in stackoverflow.