Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

Added logging of the request body when scanning request was marked as failed #131

Merged
merged 3 commits into from
Apr 21, 2017

Conversation

agr
Copy link
Contributor

@agr agr commented Apr 21, 2017

Logging more info for failed scans, to make investigations easier. #398

@dnfclas
Copy link

dnfclas commented Apr 21, 2017

@agr,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

$"{{{TraceConstant.ValidatorName}}} " +
$"ValidationId: {{{TraceConstant.ValidationId}}} " +
$"for package {{{TraceConstant.PackageId}}} " +
$"v.{{{TraceConstant.PackageVersion}}} " +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-standard to prepend v.. {id} {version} is fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

@@ -230,7 +241,7 @@ public void Configuration(IAppBuilder app)
validationEntity.ValidatorCompleted(VcsValidator.ValidatorName, ValidationResult.Failed);
await _packageValidationTable.StoreAsync(validationEntity);

_logger.TrackValidatorResult(VcsValidator.ValidatorName, validationId, ValidationResult.Failed.ToString(), validationEntity.PackageId, validationEntity.PackageVersion);
_logger.TrackValidatorResult(VcsValidator.ValidatorName, validationId, ValidationResult.Failed.ToString(), validationEntity.PackageId, validationEntity.PackageVersion, body.Substring(0, ReasonableBodySize));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please append "(truncated)" when you truncate.

Will be able to see the full request body in blob storage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added "(truncated)", put full body into blob.

Copy link
Member

@joelverhagen joelverhagen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments

agr added 2 commits April 21, 2017 15:06
Made body completely logged in audit blob.
@agr agr merged commit d19d1d8 into dev Apr 21, 2017
@agr agr deleted the dev-agr-vfail branch April 25, 2017 00:46
joelverhagen pushed a commit that referenced this pull request Oct 26, 2020
… failed (#131)

* Added logging of the request body when scanning request was marked as failed.

* Removed "v."

* Added method to truncate string.
Made body completely logged in audit blob.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants