Do you mean you want to set the output filename dynamically during runtime? AFAIK it is not possible straight via configuration. You have two workarounds:
- set the output filename dynamically from code, or
- use a Mapped Diagnostic Context, to prepend your log messages with thread-specific data within the same log file.
The first way would be rather tedious and wasteful, since you would need instance-specific loggers and appenders for classes where different instances can be called from different threads. And even then, what if the same object is shared between multiple threads?
The second one is more natural and simple. Moreover, with a bit of postprocessing using e.g. a simple shell script, you can even filter out logs belonging to different threads into distinct log files.