log4j - how to log to multiple files not based on level
Posted on 2006-04-14
I'd like to be able to log multiple types of information in my web application:
1) Performance timings to one log file
2) Typical diagnostic information to another file
3) "Hit" or "site usage" numbers to another file (e.g., how often a particular service is called and by whom)
I'm aware of being able to log to different files based on level, but that's not what I want to do. I want to be able to choose my destination file based on what I'm logging. So, within a single method I may want to log performance timings and diagnostic information - but to different files.