1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-23 03:01:23 +01:00

update rolling file settings for LogRollBySizeLimit

This commit is contained in:
Kyle Spearrin 2019-11-25 11:40:04 -05:00
parent a838524fc9
commit a5b809f477
2 changed files with 5 additions and 5 deletions

View File

@ -222,8 +222,9 @@ namespace Bit.Core.IdentityServer
if(_globalSettings.SelfHosted) if(_globalSettings.SelfHosted)
{ {
_logger.LogWarning(Constants.BypassFiltersEventId, "Failed login attempt{0}{1}", _logger.LogWarning(Constants.BypassFiltersEventId,
twoFactorRequest ? ", 2FA invalid." : ".", $" {_currentContext.IpAddress}"); string.Format("Failed login attempt{0}{1}", twoFactorRequest ? ", 2FA invalid." : ".",
$" {_currentContext.IpAddress}"));
} }
await Task.Delay(2000); // Delay for brute force. await Task.Delay(2000); // Delay for brute force.
context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant, context.Result = new GrantValidationResult(TokenRequestErrors.InvalidGrant,

View File

@ -79,9 +79,8 @@ namespace Bit.Core.Utilities
{ {
if(globalSettings.LogRollBySizeLimit.HasValue) if(globalSettings.LogRollBySizeLimit.HasValue)
{ {
config.WriteTo config.WriteTo.File($"{globalSettings.LogDirectory}/{globalSettings.ProjectName}/log.txt",
.RollingFile($"{globalSettings.LogDirectory}/{globalSettings.ProjectName}/log.txt", rollOnFileSizeLimit: true, fileSizeLimitBytes: globalSettings.LogRollBySizeLimit);
fileSizeLimitBytes: globalSettings.LogRollBySizeLimit);
} }
else else
{ {