diff options
Diffstat (limited to 'Emby.Server.Implementations/Library/UserManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Library/UserManager.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index da80a4824..2e675ee7e 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -15,7 +15,7 @@ using MediaBrowser.Model.Connect; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Events; -using MediaBrowser.Model.Logging; +using Microsoft.Extensions.Logging; using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Users; using System; @@ -340,7 +340,7 @@ namespace Emby.Server.Implementations.Library UpdateInvalidLoginAttemptCount(user, user.Policy.InvalidLoginAttemptCount + 1); } - _logger.Info("Authentication request for {0} {1}.", user.Name, success ? "has succeeded" : "has been denied"); + _logger.LogInformation("Authentication request for {0} {1}.", user.Name, success ? "has succeeded" : "has been denied"); return success ? user : null; } @@ -392,7 +392,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.ErrorException("Error authenticating with provider {0}", ex, provider.Name); + _logger.LogError("Error authenticating with provider {0}", ex, provider.Name); return false; } @@ -461,7 +461,7 @@ namespace Emby.Server.Implementations.Library if (newValue >= maxCount) { - //_logger.Debug("Disabling user {0} due to {1} unsuccessful login attempts.", user.Name, newValue.ToString(CultureInfo.InvariantCulture)); + //_logger.LogDebug("Disabling user {0} due to {1} unsuccessful login attempts.", user.Name, newValue.ToString(CultureInfo.InvariantCulture)); //user.Policy.IsDisabled = true; //fireLockout = true; @@ -575,7 +575,7 @@ namespace Emby.Server.Implementations.Library catch (Exception ex) { // Have to use a catch-all unfortunately because some .net image methods throw plain Exceptions - _logger.ErrorException("Error generating PrimaryImageAspectRatio for {0}", ex, user.Name); + _logger.LogError("Error generating PrimaryImageAspectRatio for {0}", ex, user.Name); } } @@ -599,7 +599,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.ErrorException("Error getting {0} image info for {1}", ex, image.Type, image.Path); + _logger.LogError("Error getting {0} image info for {1}", ex, image.Type, image.Path); return null; } } @@ -775,7 +775,7 @@ namespace Emby.Server.Implementations.Library } catch (IOException ex) { - _logger.ErrorException("Error deleting file {0}", ex, configPath); + _logger.LogError("Error deleting file {0}", ex, configPath); } DeleteUserPolicy(user); @@ -1045,7 +1045,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.ErrorException("Error reading policy file: {0}", ex, path); + _logger.LogError("Error reading policy file: {0}", ex, path); return GetDefaultPolicy(user); } @@ -1109,7 +1109,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.ErrorException("Error deleting policy file", ex); + _logger.LogError("Error deleting policy file", ex); } } @@ -1144,7 +1144,7 @@ namespace Emby.Server.Implementations.Library } catch (Exception ex) { - _logger.ErrorException("Error reading policy file: {0}", ex, path); + _logger.LogError("Error reading policy file: {0}", ex, path); return new UserConfiguration(); } |
