log4net Contexts and ASP.NET

2006-02-15 Thread josh robb
I've seen an email from Piers Williams in december asking about this. Basically - in an ASP.NET application - none of the existing contexts are "safe" to use. I'd like to remedy this. There are two ways forward that I can see. 1. Add a new WebContext class. 2. Change the ThreadLogicalContext cla

Re: log4net Contexts and ASP.NET

2006-02-15 Thread josh robb
Yep - Thats the email I was talking about. Thanks for the reply. j.

Re: log4net Contexts and ASP.NET

2006-02-16 Thread josh robb
Ron Grabowski <[EMAIL PROTECTED]> wrote: > I don't think HttpContext is always available...especially inside the > Global.asax.cs methods and/or inside CacheItemRemovedCallback methods. HttpContext is available during the life cycle of a Http request. This includes any event handler in Global.asax

Re: log4net Contexts and ASP.NET

2006-02-16 Thread josh robb
On 2/16/06, Aaron Morton <[EMAIL PROTECTED]> wrote: > Perhaps you could create something similar (add objects to the > GlobalContext) to read values from the HTTPContext as a work around. Nice - Ok - for the two things I've mentioned so far (User Identity and Requested Url) this would be a fine s

Re: log4net Contexts and ASP.NET

2006-02-16 Thread josh robb
On 2/16/06, GlennDoten <[EMAIL PROTECTED]> wrote: > Josh, why bother with a flag called isWeb? If HttpContext.Current is not > null then you know you are in the context of a web app; otherwise you > aren't. It works great just checking the HTTP context because then the same > code can execute in a

Re: [jira] Commented: (LOG4NET-66) PreserveFileExtension with StaticFileName

2006-03-21 Thread josh robb
Uh - at the risk of mentioning something that everyone already knows: > RegexEncode(Path.GetFileNameWithoutExtension(baseFileName)) Regex.Escape(string str) Could be what you are looking for.