Ron, Thanks so much for the response. It kicked me into deeper thinking mode and I think I figured it out. I was using a combination of the XmlConfigurator attribute on the assembly and direct XmlConfigurator.Configure() calls, and by changing to only direct calls and rearranging the order of configuration I was able to propagate the change correctly.
Thanks again! Chris On Jan 17, 2008 12:12 AM, Ron Grabowski <[EMAIL PROTECTED]> wrote: > By multiple services do you mean separate .NET processes running as > Services ( i.e. start, stop, pause, resume)? > > Is this what your startup code looks like? > > private static void Main(string[] args) > { > GlobalContext.Properties["BaseLogsDirectory"] = "c:\\Logs"; > > XmlConfigurator.Configure(); > > } > > ----- Original Message ---- > From: Chris White < [EMAIL PROTECTED]> > To: log4net-user@logging.apache.org > Sent: Wednesday, January 16, 2008 6:21:04 PM > Subject: GlobalContext.Properties, RollingFileAppender, and PatternString > > I have multiple services running using log4net on a system and would like > to globally set the base logging directory programmatically at startup. > > It seems I should be able to set a BaseLogsDirectory property in > GlobalContext.Properties and use it in a pattern string like this: > > <file type="log4net.Util.PatternString" > value="%property{BaseLogsDirectory}\logfilename" /> > > Although the property seems to added, the next log call ends up creating a > "(null)" directory in the executing assembly's directory, where the files > end up. > > Am I forgetting something? > > Thanks, > Chris > >