vcsjones / AzureSignTool

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

No logging output #121

Closed odalet closed 2 years ago

odalet commented 3 years ago

I'm using version 2.0.17 of the tool and, with an invalid set of arguments on the command line, I end up with... no error displayed at all. I can only know something went wrong by examining ERRORLEVEL.

I managed to get console logging working by modifying a bit the end of Program.Main: I changed

return application.Execute(args);

into:

var rc =  application.Execute(args);
serviceProvider.Dispose();  
return rc;

Disposing the service provider has the effect of flushing the logger and then my wrong arguments give me:

fail: AzureSignTool.Program[0]
      Options -kvi, -kvs are required.

I'd be glad to turn this into a PR, however, I've noticed the code changed quite a lot since v2.0.17 tag. So, I'm not sure if I should branch from the tag, and into what branch this would be reintegrated...

vcsjones commented 3 years ago

I think this has been addressed in 3.0.0. can you please give it a try?

odalet commented 2 years ago

Indeed, it's fixed. Thanks!