Azure / azure-sdk-tools

Tools repository leveraged by the Azure SDK team.
MIT License
110 stars 172 forks source link

Deduplicate and standarize reusable code into shared library: logging, file utils, etc. #5281

Open konrad-jamrozik opened 1 year ago

konrad-jamrozik commented 1 year ago

A lot of our tools implement one-off abstractions, like logging or file system utilities. This leads to duplication and lack of consistency.

This work item is about building a case for deduplicating all such code into one reusable library per language, with initial focus on .NET. The benefits include less code to maintain and established conventions to follow.

.NET deduplication candidates

Below follows a list of candidate code to be deduplicated; if you find more, please add a comment in this issue, and I will incorporate it in this list!

weshaggard commented 1 year ago

FYI @benbp

benbp commented 1 year ago

On the logging topic I've had a good experience with Serilog. It makes it easy to configure output formats and create nested property contexts.

benbp commented 1 year ago

Also to add to this list: we will benefit from standardizing our argument parsing library (so there is plenty of prior art to copy from or re-use when writing tools), whether that's CommandLineParser or the new System.CommandLine.