From 5851a516337285727b2c0500d1c5c07a7a3ef2b7 Mon Sep 17 00:00:00 2001 From: hammett Date: Sun, 2 Dec 2007 02:55:49 +0000 Subject: [PATCH] - Applied Kode Khan's patch changing logger creation to use type instead of controller's name git-svn-id: https://svn.castleproject.org/svn/castle/trunk@4551 73e77b4c-caa6-f847-a29a-24ab75ae54b6 --- MonoRail/Castle.MonoRail.Framework/Controller.cs | 2 +- .../Castle.MonoRail.Framework/ControllerLifecycleExecutor.cs | 9 +-------- MonoRail/Castle.MonoRail.Views.Brail/BooViewEngine.cs | 4 ++-- MonoRail/Changes.txt | 2 ++ 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/MonoRail/Castle.MonoRail.Framework/Controller.cs b/MonoRail/Castle.MonoRail.Framework/Controller.cs index 49f6c0f45..b45087da9 100644 --- a/MonoRail/Castle.MonoRail.Framework/Controller.cs +++ b/MonoRail/Castle.MonoRail.Framework/Controller.cs @@ -910,7 +910,7 @@ namespace Castle.MonoRail.Framework if (loggerFactory != null) { - logger = loggerFactory.Create(GetType().Name); + logger = loggerFactory.Create(GetType()); } this.context = context; diff --git a/MonoRail/Castle.MonoRail.Framework/ControllerLifecycleExecutor.cs b/MonoRail/Castle.MonoRail.Framework/ControllerLifecycleExecutor.cs index b92a25ff3..01dc61a52 100644 --- a/MonoRail/Castle.MonoRail.Framework/ControllerLifecycleExecutor.cs +++ b/MonoRail/Castle.MonoRail.Framework/ControllerLifecycleExecutor.cs @@ -490,14 +490,7 @@ namespace Castle.MonoRail.Framework metaDescriptor = controller.metaDescriptor; - controller.viewEngineManager = viewEngineManager; - - ILoggerFactory loggerFactory = (ILoggerFactory) context.GetService(typeof(ILoggerFactory)); - - if (loggerFactory != null) - { - controller.logger = loggerFactory.Create(controller.GetType().Name); - } + controller.viewEngineManager = viewEngineManager; } /// diff --git a/MonoRail/Castle.MonoRail.Views.Brail/BooViewEngine.cs b/MonoRail/Castle.MonoRail.Views.Brail/BooViewEngine.cs index 703d86e85..d3a21052c 100644 --- a/MonoRail/Castle.MonoRail.Views.Brail/BooViewEngine.cs +++ b/MonoRail/Castle.MonoRail.Views.Brail/BooViewEngine.cs @@ -318,7 +318,7 @@ namespace Castle.MonoRail.Views.Brail base.Service(serviceProvider); ILoggerFactory loggerFactory = serviceProvider.GetService(typeof(ILoggerFactory)) as ILoggerFactory; if (loggerFactory != null) - logger = loggerFactory.Create(GetType().Name); + logger = loggerFactory.Create(GetType()); } // Check if a layout has been defined. If it was, then the layout would be created @@ -684,4 +684,4 @@ namespace Castle.MonoRail.Views.Brail #endregion } -} \ No newline at end of file +} diff --git a/MonoRail/Changes.txt b/MonoRail/Changes.txt index a25b8b2c5..4e35578e4 100644 --- a/MonoRail/Changes.txt +++ b/MonoRail/Changes.txt @@ -1,6 +1,8 @@ 1.0 === +- Applied Kode Khan's patch changing logger creation to use type instead of controller's name + - Implemented support for view component caching. Just use the attribute ViewComponentDetails and its properties (cache, cachekeygenerator) -- 2.11.4.GIT