Never mind, I found the proper syntax as ${variable} instead of the
Microsoft-style %var% in the existing code.
________________________________ From: Daniel Chait [mailto:[EMAIL PROTECTED] Sent: Sun 2/6/2005 10:43 AM To: [email protected] Subject: FileAppender - expand environment variables I made a change to log4net code which I thought I'd share: In "FileAppender.ConvertToFullPath(string path)" I added "path = Environment.ExpandEnvironmentVariables(path);" which enables the use of environment variables in the File attribute when configuring file appenders. Here is the new method body: protected static string ConvertToFullPath(string path) { if (path == null) { throw new ArgumentNullException("path"); } // Added: expand environment variables in path names path = Environment.ExpandEnvironmentVariables(path); if (SystemInfo.ApplicationBaseDirectory != null) { // Note that Path.Combine will return the second path if it is rooted return Path.GetFullPath(Path.Combine(SystemInfo.ApplicationBaseDirectory, path)); } return Path.GetFullPath(path); } Hope this helps. - Daniel Chait -------- Daniel Chait Lab49, Inc. Phone: 212 966 3468 x112 Email: [EMAIL PROTECTED] Web : www.lab49.com
<<winmail.dat>>
