Nicko, Thanks. Your reply pulled it together. The class starting the application did not have a Log reference. I added a Log to this class and inserted the assembly attribute in AssemblyInfo.cs. This worked. I don't consider this a pure XML configuration though. Use of the assembly attribute is code that is checked by the compiler. I understand attributes are metadata but it is still code.
One thing I found confusing in the docs is the fact that the assembly attribute is required to configure log4net without invoking the config api. John --- Nicko Cadell <[EMAIL PROTECTED]> wrote: > John, > > It looks like your app is made up of a number of > assemblies. One of the > limitations of using the configuration attributes is > that only the first > assembly to request a logger (i.e. call > LogManager.GetLogger) is checked > for assembly attributes. Looking back to your first > post it looks like > the assembly tbot-server-proxy is the first one to > call into log4net. Is > this your main assembly, the one with the attribute > on it? If not is it > possible to add a log call into your main code > start-up sequence before > other assemblies are loaded? > > Nicko > > > -----Original Message----- > > From: John Deviney [mailto:[EMAIL PROTECTED] > > Sent: 24 June 2005 17:32 > > To: 'Log4NET User' > > Subject: RE: Log File Not Created with Pure XML > Configuration > > > > I tried pure xml config with and without an > assembly > > attribute in AssemblyInfo.cs file. > > > > John Deviney > > Texas Windstorm Insurance Association > > 5700 S. MoPac Exp., Building E, Suite 530 Austin, > TX 78749 > > [EMAIL PROTECTED] > > > > > > -----Original Message----- > > From: Scott Wojan [mailto:[EMAIL PROTECTED] > > Sent: Friday, June 24, 2005 11:23 AM > > To: Log4NET User > > Subject: RE: Log File Not Created with Pure XML > Configuration > > > > > > John, > > > > You had that didn't you? > > > > -Scott > > > > > > > > -----Original Message----- > > From: Nicko Cadell [mailto:[EMAIL PROTECTED] > > Sent: Friday, June 24, 2005 10:16 AM > > To: Log4NET User > > Subject: RE: Log File Not Created with Pure XML > Configuration > > > > Scott, > > > > For configuring log4net you have 2 options. The > first is > > programmatic configuration, i.e. calling > > XmlConfigurator.Configure(new > System.IO.FileInfo(...)). The > > other alternative is to add an assembly level > attribute to > > your assembly which instructs log4net where to > load the > > config data from. > > > > If you want to load the config from the > applications .config > > file you should add the following attribute to > your assembly: > > > > [assembly: log4net.Config.XmlConfigurator] > > > > > > More details can be found here: > > > http://logging.apache.org/log4net/release/manual/configuration > > .html#attr > > ibutes > > > > Cheers, > > > > Nicko > > > > > -----Original Message----- > > > From: Scott Wojan > [mailto:[EMAIL PROTECTED] > > > Sent: 23 June 2005 21:41 > > > To: Log4NET User > > > Subject: RE: Log File Not Created with Pure XML > Configuration > > > > > > Then it can't be a security issue... > > > Local admin can do whatever it wants. > > > > > > Anyone else got any suggestions??? > > > > > > Scott > > > > > > -----Original Message----- > > > From: John Deviney > [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, June 23, 2005 3:38 PM > > > To: Log4NET User > > > Subject: RE: Log File Not Created with Pure XML > Configuration > > > > > > Yes, running on my local pc and trying to log to > same using > > the local > > > administrator account on 2000 Pro. > > > Same result running under a domain account with > local admin > > > privileges. > > > > > > John > > > > > > --- Scott Wojan <[EMAIL PROTECTED]> wrote: > > > > > > > John, > > > > > > > > Exes will run under the security credentials > of the user > > > that started > > > > them (unless you specify someone else using > "Run As"). If > > > the account > > > > you are using does not have write permission > to the > > directory it is > > > > trying to log to then it won't/can't be > created. > > > > > > > > When you tested the "C# windows exe" was it > running on your > > > local PC? > > > > Were you trying to write it to a folder on > your local PC? > > > > > > > > Scott > > > > > > > > > > > > -----Original Message----- > > > > From: John Deviney > [mailto:[EMAIL PROTECTED] > > > > Sent: Thursday, June 23, 2005 3:15 PM > > > > To: Log4NET User > > > > Subject: RE: Log File Not Created with Pure > XML Configuration > > > > > > > > Thanks for the response. > > > > > > > > Could this be a security issue? I tested a > pure xml > > > configuration in > > > > a simple C# windows exe and had the same > problem, no log > > > file created > > > > and no evidence of a configuration being > loaded in log4net debug. > > > > > > > > I thought a pure win exe had full access by > default to > > > everything on a > > > > > > > local machine including the file system. The > log4net docs > > > mentioned a > > > > > > > possible security issue if you used a > non-application > > > config xml file > > > > but not if you configure through the > App.config. > > > > > > > > Could this be a bug in log4net? > > > > > > > > John > > > > > > > > --- Scott Wojan <[EMAIL PROTECTED]> > wrote: > > > > > > > > > John, > > > > > > > > > > I just tested the config file you sent (both > ways) > > > > and it seems to > > > > > work for me. > > > > > I'm sorry, I guess you'll have to wait for > someone > > > > more familiar with > > > > > it than I am. > > > > > > === message truncated === ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com
