Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 7014 invoked from network); 24 Jun 2005 15:42:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Jun 2005 15:42:10 -0000 Received: (qmail 83286 invoked by uid 500); 24 Jun 2005 15:42:09 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 83270 invoked by uid 500); 24 Jun 2005 15:42:08 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 83257 invoked by uid 99); 24 Jun 2005 15:42:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2005 08:42:08 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [216.16.195.51] (HELO bearcat.twia.org) (216.16.195.51) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2005 08:42:08 -0700 Message-ID: <2EA3A2F5B3AEC04AAC574296ED7068DB073868@WXCHPRD.twia.org> From: John Deviney To: 'Log4NET User' Subject: RE: Log File Not Created with Pure XML Configuration Date: Fri, 24 Jun 2005 10:42:01 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Nicko, I tried this option and it did not work. My App.config contained:
My AssemblyInfo.cs contained (I tried both): [assembly: log4net.Config.XmlConfigurator] [assembly: log4net.Config.XmlConfigurator(ConfigFileExtension="log4net"] No api call to load the configuration. Result, no log file is created. John Deviney Texas Windstorm Insurance Association 5700 S. MoPac Exp., Building E, Suite 530 Austin, TX 78749 jdeviney@twia.org -----Original Message----- From: Nicko Cadell [mailto:nicko@neoworks.com] 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:SWojan@trammellcrow.com] > 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:johnhdeviney@yahoo.com] > 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 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:johnhdeviney@yahoo.com] > > 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 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. > > > > > > Thanks, > > > Scott > > > > > > > > > > > > > > > -----Original Message----- > > > From: John Deviney [mailto:JDeviney@TWIA.ORG] > > > Sent: Wednesday, June 22, 2005 12:35 PM > > > To: 'Log4NET User' > > > Subject: RE: Log File Not Created with Pure XML > > Configuration > > > > > > Yes, that was the only change. I did leave out > > some additional > > > configuration unrelated to log4net for brevity. > > > Here is the complete > > > App.config just in case something else in the file > > might be causing a > > > problem. Also, we are using an interop product, > > JNBridge, to allow a > > > C# client to talk to a Java server. So, there are > > actually several > > > other jnbridge assemblies that are referenced > > indirectly. > > > > > > > > > > > > > > > > > > > > > > >
> > > > > type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/> > > > > > > > > >
> > > > > > > > type="System.Configuration.SingleTagSectionHandler"/> > > >
> > > > > > > > type="System.Configuration.SingleTagSectionHandler"/> > > >
> > > > > > > > type="System.Configuration.SingleTagSectionHandler"/> > > >
> > > > > > > > type="System.Configuration.NameValueSectionHandler"/> > > > > > > > > > > > > > > > > > > > > > > value="eagle" > > > /> > > > > > > > > value="DC=twia,DC=org" > > > /> > > > > value="true"/> > > > > > > > > > > > > > > type="log4net.Appender.FileAppender"> > > > > /> > > > > > > > > > > > > > > /> > > > > > /> > > > > > value="%d %-4r [%t] %-5p %c %x - %m%n" /> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > scheme="sharedmem" > > > jvm="E:/j2sdk1.4.2_05/jre/bin/server/jvm.dll" > > > > > > > > > jnbcore="../../../tbot-server-proxy/depends/java/jnbcore.jar" > > > > > > > > > bcel="../../../tbot-server-proxy/depends/java/bcel-5.1-jnbridge.jar" > > > > > > > > > classpath="../../../tbot-server-proxy/depends/java/commons-col > lections-2 > > > .1.1 > > > > > > .jar;../../../tbot-server-proxy/depends/java/commons-logging-1 > .0.4.jar;. > > > ./.. > > > > > > /../tbot-server-proxy/depends/java/log4j-1.2.8.jar;../../../tb > ot-server- > > > prox > > > > > > y/depends/java/hibernate3.jar;../../../tbot-server-proxy/depen > ds/java/jb > > > ossa > > > > > > ll-client.jar;../../../tbot-server-proxy/depends/java;../../.. > /tbot-serv > > > er-p > > > > > > roxy/depends/java/common.jar;../../../tbot-server-proxy/depend > s/java/tbo > > > t-sy > > > > > > stem.jar;../../../tbot-server-proxy/depends/java/tbot-ejb.jar; > ../../../t > > > bot- > > > > > > server-proxy/depends/java/client.jar;../../../tbot-server-prox > y/depends/ > > > java > > > > > > /tbot-test.jar;../../../tbot-server-proxy/depends/java/thirdPa > rtyTools.j > > > ar;. > > > > > > ./../../tbot-server-proxy/depends/java/commons-validator-1.1.4 > .jar;../.. > > > /../ > > > > > > tbot-server-proxy/depends/java/commons-digester-1.5.jar;../../ > ../tbot-se > > > rver > > > -proxy/depends/java/commons-beanutils.jar" > > > jvmOptions.0="-Xmx400m" > > > > > > > > > jvmOptions.1="-Djava.security.auth.login.config=file:../../../ > tbot-serve > > > r-pr > > > === message truncated === > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection > around http://mail.yahoo.com > ++++++CONFIDENTIALITY NOTICE++++++ > The information in this email may be confidential and/or > privileged. This email is intended to be reviewed by only the > individual or organization named above. If you are not the > intended recipient or an authorized representative of the > intended recipient, you are hereby notified that any review, > dissemination or copying of this email and its attachments, > if any, or the information contained herein is prohibited. If > you have received this email in error, please immediately > notify the sender by return email and delete this email from > your system. >