You have a couple alteratives:
1. At startup, call GDC.Set("logdir", @"c:\path\to\my\log\directory");
And reference it in the configuration with
<target ... fileName="${gdc:logdir}/logfile.txt" />
2. You can also directly modify configuration, by finding FileTarget and changing its FileName property. Make sure to do this on a configuration that has not been activated yet (i.e loaded but not assigned to LogManager.Configuration), otherwise behavior is undefined.