mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-17 15:53:42 +01:00
Fix log dir
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
|
||||
namespace Emby.Server.Implementations.AppBase
|
||||
@@ -13,10 +12,11 @@ namespace Emby.Server.Implementations.AppBase
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="BaseApplicationPaths"/> class.
|
||||
/// </summary>
|
||||
protected BaseApplicationPaths(string programDataPath, string appFolderPath)
|
||||
protected BaseApplicationPaths(string programDataPath, string appFolderPath, string logDirectoryPath)
|
||||
{
|
||||
ProgramDataPath = programDataPath;
|
||||
ProgramSystemPath = appFolderPath;
|
||||
LogDirectoryPath = logDirectoryPath;
|
||||
}
|
||||
|
||||
public string ProgramDataPath { get; private set; }
|
||||
@@ -106,6 +106,11 @@ namespace Emby.Server.Implementations.AppBase
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The _log directory
|
||||
/// </summary>
|
||||
private string _logDirectoryPath;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the log directory
|
||||
/// </summary>
|
||||
@@ -114,7 +119,18 @@ namespace Emby.Server.Implementations.AppBase
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(ProgramDataPath, "logs");
|
||||
if (string.IsNullOrEmpty(_logDirectoryPath))
|
||||
{
|
||||
_logDirectoryPath = Path.Combine(ProgramDataPath, "logs");
|
||||
|
||||
Directory.CreateDirectory(_logDirectoryPath);
|
||||
}
|
||||
|
||||
return _logDirectoryPath;
|
||||
}
|
||||
set
|
||||
{
|
||||
_logDirectoryPath = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user