Hi Roelof, Thanks heaps for that sugestion, I did try it earlier but it simply didn't work for me, but now it does (Late night programming, I must have done somthing stupid. :))
Thanks again, -Maxus On May 2, 5:51 pm, Roelof Blom <[email protected]> wrote: > Hi, > > My guess is that the facility does not support this, you need to put the > following somewhere in your application: > > *[assembly: log4net.Config.XmlConfigurator(Watch=true)]* > > -- Roelof. > > > > On Fri, May 1, 2009 at 1:21 PM, Maxus <[email protected]> wrote: > > > Hi People, > > > I'm must be missing somthing, I cant get the log4net facility to take > > its configuration from my App.config file, here is my config so far: > > > <?xml version="1.0" encoding="utf-8" ?> > > <configuration> > > > <configSections> > > <section name="log4net" > > type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/> > > <section name="castle" > > type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler, > > Castle.Windsor"/> > > </configSections> > > > <!-- Castle Configuration --> > > <castle> > > <facilities> > > <facility id="loggingfacility" > > configFile="RSS.KM.DataAccess.Tests.dll.config" loggingapi="log4net" > > type="Castle.Facilities.Logging.LoggingFacility, > > Castle.Facilities.Logging" /> > > <facility id="nhibernatefacility" > > type="Castle.Facilities.NHibernateIntegration.NHibernateFacility, > > Castle.Facilities.NHibernateIntegration" isDebug="false" isWeb="false" > > useReflectionOptimizer="true"> > > <factory id="sessionFactory"> > > <settings> > > <item > > key="connection.provider">NHibernate.Connection.DriverConnectionProvider, > > NHibernate</item> > > <item > > key="connection.driver_class">NHibernate.Driver.SqlClientDriver</item> > > <item key="connection.connection_string">Server= > > (local);Database=Test;Integrated Security=SSPI;</item> > > <item key="show_sql">true</item> > > <item key="dialect">NHibernate.Dialect.MsSql2005Dialect</ > > item> > > <item key="default_schema">[Test].[dbo]</item> > > <item > > > key="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, > > NHibernate.ByteCode.Castle</item> > > </settings> > > <assemblies> > > <assembly>RSS.KM.DataAccess.Tests</assembly> > > <assembly>RSS.KM.DataAccess</assembly> > > </assemblies> > > <listeners> > > <listener > > type="RSS.KM.DataAccess.Common.AuditSaveOrUpdateEventListener, > > RSS.KM.DataAccess" event="SaveUpdate" /> > > <listener > > type="RSS.KM.DataAccess.Common.AuditSaveEventListener, > > RSS.KM.DataAccess" event="Save" /> > > </listeners> > > </factory> > > </facility> > > </facilities> > > <components> > > <component id="Common.Repository" > > type="RSS.KM.DataAccess.Common.BaseRepository`1, RSS.KM.DataAccess" /> > > <component id="Common.DatabaseUtilities" > > type="RSS.KM.DataAccess.Common.DatabaseUtilities, RSS.KM.DataAccess" / > > > </components> > > </castle> > > <!-- Castle Configuration --> > > > <!-- Logging Configuration --> > > <log4net> > > <root> > > <level value="ERROR" /> > > <appender-ref ref="TraceAppender"/> > > </root> > > <appender name="TraceAppender" > > type="log4net.Appender.TraceAppender"> > > <layout type="log4net.Layout.PatternLayout"> > > <conversionPattern value="%date [%thread] %-5level %logger > > [%property{NDC}] - %message%newline" /> > > </layout> > > </appender> > > </log4net> > > <!-- /Logging Configuration --> > > > </configuration> > > > I can see log4net reads its config by default from "log4net.config", > > any way to to get it to read from the App.config file? (im sure im > > just missing something stupid) :) > > > Thanks! > > M- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
