From 41ed3c15ffee7430b0718114bc7732f354198fb7 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 8 Dec 2013 21:24:48 -0500 Subject: fixed service stack logging --- MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs | 5 ++--- MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Server.Implementations/HttpServer') diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs index 29dce6747..5e4c6f0aa 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -63,8 +63,6 @@ namespace MediaBrowser.Server.Implementations.HttpServer _logger = logManager.GetLogger("HttpServer"); - LogManager.LogFactory = new ServerLogFactory(logManager); - _containerAdapter = new ContainerAdapter(applicationHost); for (var i = 0; i < 2; i++) @@ -477,7 +475,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer ServiceController = CreateServiceController(); _logger.Info("Calling ServiceStack AppHost.Init"); - Init(); + + base.Init(); } /// diff --git a/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs b/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs index 57acddc43..c403c09b4 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/ServerFactory.cs @@ -1,6 +1,7 @@ using MediaBrowser.Common; using MediaBrowser.Controller.Net; using MediaBrowser.Model.Logging; +using ServiceStack.Logging; namespace MediaBrowser.Server.Implementations.HttpServer { @@ -20,6 +21,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer /// IHttpServer. public static IHttpServer CreateServer(IApplicationHost applicationHost, ILogManager logManager, string serverName, string handlerPath, string defaultRedirectpath) { + LogManager.LogFactory = new ServerLogFactory(logManager); + return new HttpListenerHost(applicationHost, logManager, serverName, handlerPath, defaultRedirectpath); } } -- cgit v1.2.3