vcsjones / AzureSignTool

SignTool Library and Azure Key Vault Support
MIT License
272 stars 85 forks source link

Feature Request: Improve MultiFile Logging #149

Open ld0614 opened 2 years ago

ld0614 commented 2 years ago

Firstly please let me thank you for an awesome tool!

I'm trying to set up a An Azure DevOps pipeline that will sign approved files, I noticed that when I provide an arbitrary list of files some will fail as they aren't supported (as expected). Unfortunately the error logging makes it very hard to understand which files haven't been signed without running a second validation phase as I get an output which looks like

trce: AzureSignTool.SignCommand[0]
      Calling SignerSignEx3
trce: AzureSignTool.SignCommand[0]
      Calling SignerSignEx3
fail: AzureSignTool.SignCommand[0]
      The file cannot be signed because it is not a recoginized file type for signing or it is corrupt.
fail: AzureSignTool.SignCommand[0]
      The file cannot be signed because it is not a recoginized file type for signing or it is corrupt.
fail: AzureSignTool.SignCommand[0]
      The file cannot be signed because it is not a recoginized file type for signing or it is corrupt.
fail: AzureSignTool.SignCommand[0]
      The file cannot be signed because it is not a recoginized file type for signing or it is corrupt.
fail: AzureSignTool.SignCommand[0]
      Signing failed with error 800B0003.
fail: AzureSignTool.SignCommand[0]
      Signing failed with error 800B0003.

Looking at the code it looks like the logger scope includes the filePath (https://github.com/vcsjones/AzureSignTool/blob/d00c7de418ef27eb87cbed0bb3d6b929f7ef563a/src/AzureSignTool/SignCommand.cs#L297)

however, the actual error message doesn't include this information in the console output.

Would it be possible to include the file path into the error output, either by modifying the logger output to include the scope or simply adding the filename as part of the error message?

vcsjones commented 2 years ago

I think this was fixed by https://github.com/vcsjones/AzureSignTool/pull/145, but it's not released yet. Would you be willing to try building from source here to see if it's fixed in main?

ld0614 commented 2 years ago

Thanks for the prompt response @vcsjones thats exactly what I was looking for, I don't suppose there is an ETA for a new release is there?