mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 05:57:20 -04:00
Ensure log dir exists
This commit is contained in:
parent
9ccc259c99
commit
76d6b1fc2a
1 changed files with 2 additions and 0 deletions
|
@ -130,6 +130,8 @@ namespace Jellyfin.Server
|
|||
string logDir = Environment.GetEnvironmentVariable("JELLYFIN_LOG_DIR");
|
||||
if (string.IsNullOrEmpty(logDir)){
|
||||
logDir = Path.Combine(programDataPath, "logs");
|
||||
// Ensure logDir exists
|
||||
Directory.CreateDirectory(logDir);
|
||||
// $JELLYFIN_LOG_DIR needs to be set for the logger configuration manager
|
||||
Environment.SetEnvironmentVariable("JELLYFIN_LOG_DIR", logDir);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue