A quick google search yielded this:
http://stackoverflow.com/questions/571876/best-way-to-dynamically-set-an-appender-file-path
You can leverage the %property{} part of log4net to accomplish what you're
asking.
Unfortunately, if you have multiple appenders all using that property, it
will be changed for all of them as it's a global property. If that's a
limitation, let me know.
Hope this helps,
Ross
On Wed, Aug 5, 2009 at 4:12 AM, Bernhard Heinzel
<[email protected]>wrote:
> Hi,
>
> is it possible to confige a RollingFileAppender in the configfile and
> specify the output file programatically?
>
> My usecase is that I want to log in different files (e.g. agent.5.out,
> agent.4.out, ...) but the appender which will be used should be configured
> in the config file.
>
> Any Suggentions?
>
> Thanks.
>
> Bernhard
>
> ------------------------------
> See all the ways you can stay connected to friends and
> family<http://www.microsoft.com/windows/windowslive/default.aspx>
>