microsoft / microsoft/winget-create
Provide an option to specify the log path
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 651
- Forks
- 114
- Avg merge
- 7h 52m
- Merged PRs (30d)
- 3
Description
Description of the new feature / enhancement
When invoking wingetcreate with automation, there may be an error that occurs and it would be helpful for the automation to output the log file to help diagnose the issue. The problem is that the invocation of the tool doesn't provide a way to explicitly set the log path. There does exist the default log location at %LocalAppData%\Packages\Microsoft.WindowsPackageManagerManifestCreator_8wekyb3d8bbwe\LocalState\DiagOutputDir which is useful for a human to get but it's not great for automation because:
- It requires explicitly hardcoding that path to look for the log file. This ties the automation to the implementation of the tool. If the tool changes its log location, then the automation would be broken.
- The log file name is generated with a timestamp so it's not known ahead of time what the name of the file will be.
Proposed technical implementation details
Include a -o,--log option that allows a log file path to be set for any wingetcreate command, just like the winget CLI has.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating wingetcreate's command-line option parsing and logging setup, then compare the requested -o,--log behavior with the existing winget CLI convention. Verify the option is available across wingetcreate commands and that an invocation writes its log to the specified path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100