aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/ApplicationHost.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-08 23:44:51 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-01-08 23:44:51 -0500
commit247a40fa614241b52babb29bc03b0afd9a9031f9 (patch)
tree5e82b401988d9246d8da2e59a9e29d0c2627c743 /MediaBrowser.ServerApplication/ApplicationHost.cs
parentdcc5f9ebab9fe0260d6886d79284ccdce83a4814 (diff)
add console logging during startup
Diffstat (limited to 'MediaBrowser.ServerApplication/ApplicationHost.cs')
-rw-r--r--MediaBrowser.ServerApplication/ApplicationHost.cs21
1 files changed, 15 insertions, 6 deletions
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs
index 13328d622..bf20c8fb8 100644
--- a/MediaBrowser.ServerApplication/ApplicationHost.cs
+++ b/MediaBrowser.ServerApplication/ApplicationHost.cs
@@ -94,11 +94,16 @@ namespace MediaBrowser.ServerApplication
/// Gets the HTTP server URL prefix.
/// </summary>
/// <value>The HTTP server URL prefix.</value>
- public string HttpServerUrlPrefix
+ private IEnumerable<string> HttpServerUrlPrefixes
{
get
{
- return "http://+:" + ServerConfigurationManager.Configuration.HttpServerPortNumber + "/" + WebApplicationName + "/";
+ var list = new List<string>
+ {
+ "http://+:" + ServerConfigurationManager.Configuration.HttpServerPortNumber + "/" + WebApplicationName + "/"
+ };
+
+ return list;
}
}
@@ -212,6 +217,8 @@ namespace MediaBrowser.ServerApplication
Logger.ErrorException("Error in {0}", ex, entryPoint.GetType().Name);
}
});
+
+ LogManager.RemoveConsoleOutput();
}
/// <summary>
@@ -462,7 +469,7 @@ namespace MediaBrowser.ServerApplication
{
try
{
- ServerManager.Start(HttpServerUrlPrefix, ServerConfigurationManager.Configuration.EnableHttpLevelLogging);
+ ServerManager.Start(HttpServerUrlPrefixes, ServerConfigurationManager.Configuration.EnableHttpLevelLogging);
}
catch (Exception ex)
{
@@ -494,7 +501,7 @@ namespace MediaBrowser.ServerApplication
HttpServer.EnableHttpRequestLogging = ServerConfigurationManager.Configuration.EnableHttpLevelLogging;
- if (!string.Equals(HttpServer.UrlPrefix, HttpServerUrlPrefix, StringComparison.OrdinalIgnoreCase))
+ if (!HttpServer.UrlPrefixes.SequenceEqual(HttpServerUrlPrefixes, StringComparer.OrdinalIgnoreCase))
{
NotifyPendingRestart();
}
@@ -695,8 +702,10 @@ namespace MediaBrowser.ServerApplication
try
{
- ServerAuthorization.AuthorizeServer(ServerConfigurationManager.Configuration.HttpServerPortNumber,
- HttpServerUrlPrefix, ServerConfigurationManager.Configuration.LegacyWebSocketPortNumber,
+ ServerAuthorization.AuthorizeServer(
+ ServerConfigurationManager.Configuration.HttpServerPortNumber,
+ HttpServerUrlPrefixes.First(),
+ ServerConfigurationManager.Configuration.LegacyWebSocketPortNumber,
UdpServerEntryPoint.PortNumber,
ConfigurationManager.CommonApplicationPaths.TempDirectory);
}