mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-18 19:00:47 +02:00
Fixed: Only log /proc/mounts exception once per process
This commit is contained in:
parent
4914fcd5df
commit
38ab533272
1 changed files with 7 additions and 1 deletions
|
|
@ -27,6 +27,8 @@ public class ProcMountProvider : IProcMountProvider
|
|||
|
||||
private static Dictionary<string, bool> _fileSystems;
|
||||
|
||||
private bool _hasLoggedProcMountFailure = false;
|
||||
|
||||
public ProcMountProvider(Logger logger)
|
||||
{
|
||||
_logger = logger;
|
||||
|
|
@ -45,7 +47,11 @@ public List<IMount> GetMounts()
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Debug(ex, "Failed to retrieve mounts from {0}", PROC_MOUNTS_FILENAME);
|
||||
if (!_hasLoggedProcMountFailure)
|
||||
{
|
||||
_logger.Debug(ex, "Failed to retrieve mounts from {0}", PROC_MOUNTS_FILENAME);
|
||||
_hasLoggedProcMountFailure = true;
|
||||
}
|
||||
}
|
||||
|
||||
return new List<IMount>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue