I want to change the path and file name of my log4j logfile dynamically.
I have read a lot of pages and nearly every tell me that I should use system properties like
I think you meant "my.log" not "{my.log"
System.setProperty("my.log", "C:/logfile.log");
I wouldn't imagine you can change this once the logging has started so you need to set this as early in your program as possible.
BTW: You can sub-class FileAppender to make it behave any way you like.