Readded some stuff
This commit is contained in:
parent
6d9ee138d6
commit
a8fde5e89c
|
@ -97,7 +97,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||||
/// Initializes a new instance of the <see cref="BaseConfigurationManager" /> class.
|
/// Initializes a new instance of the <see cref="BaseConfigurationManager" /> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="applicationPaths">The application paths.</param>
|
/// <param name="applicationPaths">The application paths.</param>
|
||||||
/// <param name="logManager">The log manager.</param>
|
/// <param name="loggerFactory">The logger factory.</param>
|
||||||
/// <param name="xmlSerializer">The XML serializer.</param>
|
/// <param name="xmlSerializer">The XML serializer.</param>
|
||||||
protected BaseConfigurationManager(IApplicationPaths applicationPaths, ILoggerFactory loggerFactory, IXmlSerializer xmlSerializer, IFileSystem fileSystem)
|
protected BaseConfigurationManager(IApplicationPaths applicationPaths, ILoggerFactory loggerFactory, IXmlSerializer xmlSerializer, IFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
|
|
|
@ -693,7 +693,7 @@ namespace Emby.Server.Implementations
|
||||||
|
|
||||||
return parts;
|
return parts;
|
||||||
}
|
}
|
||||||
/*/
|
/*
|
||||||
private void SetBaseExceptionMessage()
|
private void SetBaseExceptionMessage()
|
||||||
{
|
{
|
||||||
var builder = GetBaseExceptionMessage(ApplicationPaths);
|
var builder = GetBaseExceptionMessage(ApplicationPaths);
|
||||||
|
@ -799,13 +799,9 @@ namespace Emby.Server.Implementations
|
||||||
}
|
}
|
||||||
|
|
||||||
JsonSerializer = CreateJsonSerializer();
|
JsonSerializer = CreateJsonSerializer();
|
||||||
/*
|
|
||||||
OnLoggerLoaded(true);
|
|
||||||
LoggerFactory.LoggerLoaded += (s, e) => OnLoggerLoaded(false);
|
|
||||||
|
|
||||||
LoggerFactory.LogSeverity = ConfigurationManager.CommonConfiguration.EnableDebugLevelLogging
|
OnLoggerLoaded(true);
|
||||||
? LogSeverity.Debug
|
//LoggerFactory.LoggerLoaded += (s, e) => OnLoggerLoaded(false);
|
||||||
: LogSeverity.Info;*/
|
|
||||||
|
|
||||||
DiscoverTypes();
|
DiscoverTypes();
|
||||||
|
|
||||||
|
@ -815,7 +811,7 @@ namespace Emby.Server.Implementations
|
||||||
|
|
||||||
FindParts();
|
FindParts();
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
protected virtual void OnLoggerLoaded(bool isFirstLoad)
|
protected virtual void OnLoggerLoaded(bool isFirstLoad)
|
||||||
{
|
{
|
||||||
Logger.LogInformation("Application version: {0}", ApplicationVersion);
|
Logger.LogInformation("Application version: {0}", ApplicationVersion);
|
||||||
|
@ -834,9 +830,9 @@ namespace Emby.Server.Implementations
|
||||||
pluginBuilder.AppendLine(string.Format("{0} {1}", plugin.Name, plugin.Version));
|
pluginBuilder.AppendLine(string.Format("{0} {1}", plugin.Name, plugin.Version));
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.LogMultiline("Plugins:", LogSeverity.Info, pluginBuilder);
|
Logger.LogInformation("Plugins: {plugins}", pluginBuilder.ToString());
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
protected virtual IHttpClient CreateHttpClient()
|
protected virtual IHttpClient CreateHttpClient()
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,7 @@ namespace MediaBrowser.Model.Configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BaseApplicationConfiguration
|
public class BaseApplicationConfiguration
|
||||||
{
|
{
|
||||||
|
// TODO: @bond Remove?
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether [enable debug level logging].
|
/// Gets or sets a value indicating whether [enable debug level logging].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -21,6 +22,7 @@ namespace MediaBrowser.Model.Configuration
|
||||||
/// <value><c>true</c> if [enable auto update]; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if [enable auto update]; otherwise, <c>false</c>.</value>
|
||||||
public bool EnableAutoUpdate { get; set; }
|
public bool EnableAutoUpdate { get; set; }
|
||||||
|
|
||||||
|
// TODO: @bond Remove?
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The number of days we should retain log files
|
/// The number of days we should retain log files
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -137,13 +137,14 @@ namespace MediaBrowser.Server.Mono
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine("appHost.Init");
|
//Console.WriteLine("appHost.Init");
|
||||||
|
|
||||||
appHost.Init();
|
appHost.Init();
|
||||||
|
|
||||||
appHost.ImageProcessor.ImageEncoder = ImageEncoderHelper.GetImageEncoder(_logger, fileSystem, options, () => appHost.HttpClient, appPaths, environmentInfo, appHost.LocalizationManager);
|
appHost.ImageProcessor.ImageEncoder = ImageEncoderHelper.GetImageEncoder(_logger, fileSystem, options, () => appHost.HttpClient, appPaths, environmentInfo, appHost.LocalizationManager);
|
||||||
|
|
||||||
Console.WriteLine("Running startup tasks");
|
//Console.WriteLine("Running startup tasks");
|
||||||
|
_logger.LogInformation("Running startup tasks");
|
||||||
|
|
||||||
var task = appHost.RunStartupTasks();
|
var task = appHost.RunStartupTasks();
|
||||||
Task.WaitAll(task);
|
Task.WaitAll(task);
|
||||||
|
@ -291,10 +292,12 @@ namespace MediaBrowser.Server.Mono
|
||||||
{
|
{
|
||||||
var exception = (Exception)e.ExceptionObject;
|
var exception = (Exception)e.ExceptionObject;
|
||||||
|
|
||||||
// TODO
|
//new UnhandledExceptionWriter(_appPaths, _logger, _logManager, FileSystem, new ConsoleLogger()).Log(exception);
|
||||||
/*
|
|
||||||
new UnhandledExceptionWriter(_appPaths, _logger, _logManager, FileSystem, new ConsoleLogger()).Log(exception);
|
|
||||||
|
|
||||||
|
_logger.LogCritical(exception, "Unhandled Exception");
|
||||||
|
|
||||||
|
// TODO: @bond
|
||||||
|
/*
|
||||||
if (!Debugger.IsAttached)
|
if (!Debugger.IsAttached)
|
||||||
{
|
{
|
||||||
var message = LogHelper.GetLogMessage(exception).ToString();
|
var message = LogHelper.GetLogMessage(exception).ToString();
|
||||||
|
@ -304,7 +307,8 @@ namespace MediaBrowser.Server.Mono
|
||||||
{
|
{
|
||||||
Environment.Exit(System.Runtime.InteropServices.Marshal.GetHRForException(exception));
|
Environment.Exit(System.Runtime.InteropServices.Marshal.GetHRForException(exception));
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Shutdown()
|
public static void Shutdown()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user