diff options
| author | Bond_009 <bond.009@outlook.com> | 2019-01-01 21:34:12 +0100 |
|---|---|---|
| committer | Vasily <JustAMan@users.noreply.github.com> | 2019-01-02 02:30:59 +0300 |
| commit | 95a5dd881076f6649f4b5dc5a1897df98dc3c008 (patch) | |
| tree | 84fa9b004289c6c718dabad4220ea3b446e69083 /MediaBrowser.Api | |
| parent | 33889e53527901fb59e5dd4a6bceddeb2442d70c (diff) | |
Fix log dir
Diffstat (limited to 'MediaBrowser.Api')
| -rw-r--r-- | MediaBrowser.Api/System/SystemService.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Api/System/SystemService.cs b/MediaBrowser.Api/System/SystemService.cs index d2880f735..52e14dbcc 100644 --- a/MediaBrowser.Api/System/SystemService.cs +++ b/MediaBrowser.Api/System/SystemService.cs @@ -9,12 +9,11 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; - -using MediaBrowser.Controller.IO; using MediaBrowser.Model.IO; using MediaBrowser.Model.Net; using MediaBrowser.Model.Services; using System.Threading; +using Microsoft.Extensions.Logging; namespace MediaBrowser.Api.System { @@ -137,11 +136,12 @@ namespace MediaBrowser.Api.System try { - files = _fileSystem.GetFiles(_appPaths.LogDirectoryPath, new[] { ".txt" }, true, false); + files = _fileSystem.GetFiles(_appPaths.LogDirectoryPath, new[] { ".txt", ".log" }, true, false); } - catch (IOException) + catch (IOException ex) { - files = new FileSystemMetadata[] { }; + Logger.LogError(ex, "Error getting logs"); + files = Enumerable.Empty<FileSystemMetadata>(); } var result = files.Select(i => new LogFile |
