|
RE: URI formats are not supported: msg#00054log.log4net.user
Hey Nicko, thanks for the reply. Ok, if I understand correctly the cost for loading programmatically is that the "watch" capabilities would not be available. In that a client is running the software and we want to change the root context from WARN to DEBUG, the app would have to be restarted. Is that correct? I suppose if that is the case I could implement my own sort of watchURL type utility. Once again, thanks for the response. Thanks, Josh Hawthorne jhawthorne@xxxxxxxxxxxx -----Original Message----- From: Nicko Cadell [mailto:nicko@xxxxxxxxxxxx] Sent: Sunday, February 13, 2005 2:38 PM To: Log4NET User Subject: RE: URI formats are not supported Josh, Log4net currently expects the application to be loaded from the local disk, and it only supports implicit loading of config from local disk. If you need to load the configuration from a web server, i.e. from a URL, you will need to initialise log4net programmatically by calling the DOMConfigurator.Configure method. Something like this should do the trick: private static void ConfigureFromUrl(string configUriStr) { Uri configUri = new Uri(configUriStr); WebRequest req = WebRequest.Create(configUri); WebResponse resp = req.GetResponse(); log4net.Config.DOMConfigurator.Configure(resp.GetResponseStream()); resp.Close(); } Nicko > -----Original Message----- > From: Josh Hawthorne [mailto:jhawthorne@xxxxxxxxxxxx] > Sent: 09 February 2005 22:47 > To: Log4NET User > Subject: RE: URI formats are not supported > > If it's any help to anyone who might be checking on this for > me, I have determined that the exception is due to the > AppDomain.CurrentDomain.BaseDirectory returning an URL > formatted string (i.e. http://server/AppName). Apparently the > colon is not appreciated by the FileInfo object in > log4net.Config.DOMConfiguratorAttribute. Is there any other > way to configure Log4Net so that the > AppDomain.CurrentDomain.BaseDirectory won't be taken into > account? Or any other ideas? > > > > Thanks again, > > Josh Hawthorne > > jhawthorne@xxxxxxxxxxxx > > > > ________________________________ > > From: Josh Hawthorne [mailto:jhawthorne@xxxxxxxxxxxx] > Sent: Wednesday, February 09, 2005 1:39 PM > To: log4net-user@xxxxxxxxxxxxxxxxxx > Subject: URI formats are not supported > > > > Hello all, > > > > First posting here so please be gentle. :-) I'm hoping this > is a known issue and has an easy fix. Although I've found > someone else having this issue by searching the net, their > solution was to remove Log4Net. That's not what I'm hoping > for. My previous experience was with Log4J so please excuse > any blatant ignorance I'm working on resolving. :-) > > > > > > General info first: > > Version: 1.2.0-beta8 > > Assembly: exe launched via ASP.Net No-Touch Deploy > > Runtime: .Net > > > > > > Issue: I get the following exception when I try to run my app > from a No-Touch Deploy from IIS. > > > > // Begin Exception > > An unhandled exception of type 'System.ArgumentException' > occurred in mscorlib.dll > > > > Additional information: URI formats are not supported. > > // End Exception > > > > This same application runs fine when directly executed on the > workstation as well as directly executed on the server. I > have played around with permissions on the workstation to > grant full privileges to the app, and still get the same > exception. The exception is occurring when I try to > initialize a logger. > > > > Code: > > private static readonly log4net.ILog log = > log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetC > urrentMethod().DeclaringType); > > > > Thanks in advance for any help you might be able to provide. > > > > Regards, > > Josh Hawthorne > > jhawthorne@xxxxxxxxxxxx > > > > > > |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Programmatically determine if DOMConfigurator.Configure() failed: 00054, Thibaut Barrère |
|---|---|
| Next by Date: | RE: URI formats are not supported: 00054, Nicko Cadell |
| Previous by Thread: | RE: URI formats are not supportedi: 00054, Nicko Cadell |
| Next by Thread: | RE: URI formats are not supported: 00054, Nicko Cadell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |