tag:blogger.com,1999:blog-15136575.post2527279536629249575..comments2023-10-17T12:00:16.772+01:00Comments on Code rant: More Windsor Love: Using log4net integrationMike Hadlowhttp://www.blogger.com/profile/16441901713967254504noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-15136575.post-90246169685083185082012-05-18T23:13:31.237+01:002012-05-18T23:13:31.237+01:00Excellent post. It helped me greatly simplify my l...Excellent post. It helped me greatly simplify my logging config and setup code.Antony Scotthttps://www.blogger.com/profile/10634051310777937593noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-68951642299251730922011-01-11T23:38:17.067+00:002011-01-11T23:38:17.067+00:00Fluent Castle Windsor config is even easier. You s...Fluent Castle Windsor config is even easier. You still need to edit the web.config/app.config file with the <log4net> tags, but you don't need to do the <facilities> part of the configuration if you use the following:<br /><br />MyWindsorContainerInstance<br /> .AddFacility<LoggingFacility>(f => f<br /> .LogUsing(LoggerImplementation.Log4net)<br /> .WithAppConfig());Mufasanoreply@blogger.comtag:blogger.com,1999:blog-15136575.post-9488606914304447192009-02-10T09:35:00.000+00:002009-02-10T09:35:00.000+00:00Hi Flominator,I'm using the trunk, it definately w...Hi Flominator,<BR/><BR/>I'm using the trunk, it definately works. Download the Suteki Shop code and try it for yourself.<BR/><BR/>Note that I'm doing this in the context of ASP.NET MVC not Monorail so I have no opinion on the Logger member of SmartDispatcherController. I simply inject ILogger wherever I need to use it. Here's an example:<BR/><BR/>http://code.google.com/p/sutekishop/source/browse/trunk/Suteki.Shop/Suteki.Common/Services/EmailSenderLogger.csMike Hadlowhttps://www.blogger.com/profile/16441901713967254504noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-6781971488163789782009-02-10T09:18:00.000+00:002009-02-10T09:18:00.000+00:00I also asked this question at the Castle users gro...I also asked this question <A HREF="http://groups.google.com/group/castle-project-users/browse_thread/thread/99830f2cf776a737" REL="nofollow">at the Castle users group</A>.Flominatorhttps://www.blogger.com/profile/00816196719266021007noreply@blogger.comtag:blogger.com,1999:blog-15136575.post-76407627187915055622009-02-10T09:05:00.000+00:002009-02-10T09:05:00.000+00:00Hi there, thanks for this post. Unfortunately I ca...Hi there, <BR/><BR/>thanks for this post. Unfortunately I can't get it to work. My controller still has the Castle.Core.Logging.NullLogger set as Logger property.<BR/><BR/>Did you test it with the Castle trunk or RC2? Could it maybe be the problem mentioned at <A HREF="http://forum.castleproject.org/viewtopic.php?p=12187" REL="nofollow">this forum post</A>? <BR/><BR/>Any ideas on how to solve this without having to put <A HREF="http://forum.castleproject.org/viewtopic.php?p=13604#13604" REL="nofollow">this code</A> into every controller?<BR/><BR/>Thanks,<BR/><BR/>Flo<BR/><BR/>FYI: Sean's link no longer works, please use <A HREF="http://web.archive.org/web/20080120100438/http://blog.unitedhandmade.com/archive/2007/07/07/how-to-enable-log4net-integration-with-monorail.aspx" REL="nofollow">this one</A>.Flominatorhttps://www.blogger.com/profile/00816196719266021007noreply@blogger.com