You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by "Pelton, Brian" <bp...@jgboswell.com> on 2006/04/27 21:51:01 UTC
Use properties in log file name
I would like to use the host name in the log file's name:
<appender name="LogAppender" type="log4net.Appender.FileAppender,
log4net">
<file value="logs/RecBuilder.[%p{log4net:HostName}].log" />
But this doesn't work.
When I look at log4net's internal log, it says it cannot create the
appender because:
"System.NotSupportedException: The given path's format is not
supported."
Is there anyway to have a dynamic log file name based on the machine
name or other environment variables?
--Brian