Skip to content

Add setting for logs to use CCM format#1

Closed
Copilot wants to merge 18 commits into
copilot-agent-windowsfrom
copilot/add-logs-cmtrace-format
Closed

Add setting for logs to use CCM format#1
Copilot wants to merge 18 commits into
copilot-agent-windowsfrom
copilot/add-logs-cmtrace-format

Conversation

Copilot AI commented May 15, 2026

Copy link
Copy Markdown

📖 Description

Adds a logging.format enum setting to WinGet that controls the log file format. The setting accepts "winget" (default, existing behaviour) or "CCM" to enable CCM/CMTrace-compatible log formatting in the FileLogger.

When "CCM" is selected, log entries are written in the format recognized by CMTrace and Microsoft Endpoint Configuration Manager log viewers:

<![LOG[message]LOG]!><time="HH:mm:ss.fff+###" date="MM-dd-YYYY" component="channel" context="" type="N" thread="TID" file="">

Key changes:

  • Added LogFileFormat enum (WinGet, CCM) to AppInstallerLogging.h
  • Replaced the previous LoggingUseCMTrace bool with LoggingFormat in the Setting enum, mapped to .logging.format
  • Added ToCCMLogLine() helper in FileLogger.cpp; FileLogger::Write() dispatches to it when logging.format is "CCM"
  • Added .github/workflows/build-msix.yml — builds an x64 Release MSIX on pushes to copilot/** branches, PRs, and manual dispatch, uploading the package as a GitHub Actions artifact
  • Added fff (milliseconds datetime format token) to .github/actions/spelling/expect.txt to fix spelling CI check

Example settings.json:

{
    "logging": {
        "format": "CCM"
    }
}

🔗 References

🔍 Validation

Unit tests added under SettingLoggingFormat in AppInstallerCLITests covering:

  • Default value is WinGet
  • "winget" and "CCM" values parse correctly
  • Case-insensitive matching ("CCM" and "ccm" both work)
  • Invalid value (e.g. "cmtrace") produces a warning and falls back to default
  • Wrong type produces a warning and falls back to default

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task
Original prompt

add a setting for logs to use the CMTrace format. they shouldn't use it by default. write and run appropriate tests. check past PRs and issues to ensure you follow conventions in the codebase

Created from VS Code.

@github-actions

This comment has been minimized.

@pl4nty Tom Plant (pl4nty) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the format's name is CCM, eg ToCCMLogLine

for the setting, let's make a logging.format enum. the values can be the current format (what's its name? winget?) or "CCM". defaulting to the current format

can you upload the built files somewhere, so I can test? Ideally the full msix. maybe by uploading to a file sharing service? or writing a GitHub action that builds and uploads them as artefacts. if you choose to make an action, run it yourself to test and ensure it works

@github-actions

This comment has been minimized.

Copilot AI commented May 16, 2026

Copy link
Copy Markdown
Author

the format's name is CCM, eg ToCCMLogLine

for the setting, let's make a logging.format enum. the values can be the current format (what's its name? winget?) or "CCM". defaulting to the current format...

Done in commit 9d83250:

  • Renamed the formatter to ToCCMLogLine and the enum value to LogFileFormat::CCM
  • Replaced the logging.useCMTrace bool with a logging.format enum; valid values are "winget" (default, existing behaviour) and "CCM"
  • Added .github/workflows/build-msix.yml — it triggers on pushes to copilot/** branches and on PRs, builds an x64 Release MSIX, and uploads it as a GitHub Actions artifact (msix-x64-Release) retained for 7 days. You can also trigger it manually from the Actions tab.

Copilot AI changed the title [WIP] Add setting for logs to use CMTrace format Add setting for logs to use CCM format May 16, 2026
Copilot AI requested a review from Tom Plant (pl4nty) May 16, 2026 07:13
yao-msft and others added 12 commits May 20, 2026 11:18
## 📖 Description
We had some pre-check errors for various issues in the OS. Move those to
attempt the operation and convert any failures in the scenario on the
older OS to the well-known HRESULT.
## 📖 Description
Adds the ability to override the certificate pinning validation with
their own handler for in-proc COM callers. In-proc callers can provide a
handler delegate on their `PackageCatalogReference` object(s) before
calling `Connect` and will receive a callback when winget would execute
a certificate pinning validation. If they accept the server connection,
the certificate will be cached as it is with the internal check and
automatically approved for any future connections.

Note that `Connect` may not actually trigger the callback if the
`/information` for the catalog is already cached, but you must set the
callback before the `Connect` call for it to be attached to the
connected catalog for future use.

The callback can only be set for the MS Store catalog when the group
policy `BypassCertificatePinningForMicrosoftStore` is not configured.
…oft#6239)

## 📖 Description
Rather than comparing the symlink and desired target through
`weakly_canonical`, this change checks that the symlink is pointing to
the target via string comparison. This avoids "resolving" the symlink
and the redirection guard policy.
## 📖 Description
<!-- Describe what this PR changes, why, and any limitations. -->

This adds validation to ensure that a `PortableCommandAlias` does not
use relative paths to point outside of its directory. It uses the same
validation we already have for `RelativeFilePath`

## 🔗 References
<!-- Link related issues, PRs, or docs. Use "Resolves #1234" to
auto-close. -->

## 🔍 Validation
<!-- How did you test? List manual steps or note automated test
coverage. -->

## ✅ Checklist
<!-- Place an "x" between the brackets to check an item. e.g: [x] -->

- [ ] Signed the [Contributor License
Agreement](https://cla.opensource.microsoft.com)
- [ ] Linked to an issue
- [ ] Updated [Release Notes](../doc/ReleaseNotes.md) (if applicable)
- [ ] Updated documentation (if applicable)
- [ ] Updated [Copilot instructions](.github/copilot-instructions.md)
(if build, architecture, or conventions changed)

## 📋 Issue Type
<!-- Select the type that best describes this PR -->
- [ ] Bug fix
- [ ] Feature
- [ ] Task

###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/6251)
## 📖 Description
<!-- Describe what this PR changes, why, and any limitations. -->
Removes the git-subtree for sfs-client and replaces it with a local
vcpkg port. This port is based on the [template provided by
sfs-client](https://github.com/microsoft/sfs-client/tree/main/sfs-client-vcpkg-port/sfs-client)

* Updated the script that creates a local overlay to fetch this port.
* Added a small patch to fix a build error in the port.
* Created a new folder for the custom port patches. This means
duplicating the files, but prevents losing them when re-creating the
ports.
* Added a job to the build pipeline to ensure that the ports still match
what the creation script produces, to ensure they're kept in sync.

This fixes a CG alert for c-ares triggered by having sfs-client's
cgmanifest checked in, which caused CG to consider that as the version
used despite us updating the dependency.

## 🔗 References
<!-- Link related issues, PRs, or docs. Use "Resolves #1234" to
auto-close. -->

## 🔍 Validation
<!-- How did you test? List manual steps or note automated test
coverage. -->
It builds :D

## ✅ Checklist
<!-- Place an "x" between the brackets to check an item. e.g: [x] -->

- [ ] Signed the [Contributor License
Agreement](https://cla.opensource.microsoft.com)
- [ ] Linked to an issue
- [ ] Updated [Release Notes](../doc/ReleaseNotes.md) (if applicable)
- [ ] Updated documentation (if applicable)
- [ ] Updated [Copilot instructions](.github/copilot-instructions.md)
(if build, architecture, or conventions changed)

## 📋 Issue Type
<!-- Select the type that best describes this PR -->
- [ ] Bug fix
- [ ] Feature
- [ ] Task

###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/6243)
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.5 to 0.2.7.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/raszi/node-tmp/commit/8ea1f37d75c67569e0f151448330d52f7babf211"><code>8ea1f37</code></a>
Bump up the version</li>
<li><a
href="https://github.com/raszi/node-tmp/commit/8f24f788a356b5d45c9bec894632bd4931338153"><code>8f24f78</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/raszi/node-tmp/commit/ce787f37aaacccad921ae90990c9da33481fe59c"><code>ce787f3</code></a>
Reject non-string prefix, postfix, template</li>
<li><a
href="https://github.com/raszi/node-tmp/commit/41f71598d03f104a67e0448a7cb9bd4efcdd5980"><code>41f7159</code></a>
Bump up the version</li>
<li><a
href="https://github.com/raszi/node-tmp/commit/efa4a06f24374797ae32ab2b6ae39b7a611ae429"><code>efa4a06</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/raszi/node-tmp/commit/7ef2728ce0211b8110b2033dfe62eaf030341acf"><code>7ef2728</code></a>
Check for relative values</li>
<li>See full diff in <a
href="https://github.com/raszi/node-tmp/compare/v0.2.5...v0.2.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tmp&package-manager=npm_and_yarn&previous-version=0.2.5&new-version=0.2.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/winget-cli/network/alerts).

</details>
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/6252)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#6249)

## 📖 Description
When using DSCv3 Microsoft.WinGet/Package resource with installMode:
silent specified, WinGet was not honoring the requested mode and instead
defaulting to SilentWithProgress. This resulted in progress UI being
shown and manifest custom switches being omitted from installer
arguments.

This PR maps the installMode property (declared in DscPackageResource)
to execution context args (--silent or --interactive) before
install/update/reinstall workflows execute, ensuring:
- installMode: silent selects Silent installer switches
- installMode: interactive selects Interactive installer switches  
- installMode: default preserves existing behavior (no mode arg added)
- Manifest custom switches continue to be appended to installer
arguments
## 📖 Description
<!-- Describe what this PR changes, why, and any limitations. -->
Although these three labels get applied when the issue is opened, it is
technically a separate event that happens *after* the the issue is
opened. This means that the policy service is catching this event and
removing issues from triage before they are actually triaged. This is a
faulty implementation from microsoft#6202

## 🔗 References
<!-- Link related issues, PRs, or docs. Use "Resolves #1234" to
auto-close. -->
See recently opened issue
microsoft#6245

## 🔍 Validation
None
<!-- How did you test? List manual steps or note automated test
coverage. -->

## ✅ Checklist
<!-- Place an "x" between the brackets to check an item. e.g: [x] -->

- [x] Signed the [Contributor License
Agreement](https://cla.opensource.microsoft.com)
- [ ] Linked to an issue
- [ ] Updated [Release Notes](../doc/ReleaseNotes.md) (if applicable)
- [ ] Updated documentation (if applicable)
- [ ] Updated [Copilot instructions](.github/copilot-instructions.md)
(if build, architecture, or conventions changed)

## 📋 Issue Type
<!-- Select the type that best describes this PR -->
- [x] Bug fix
- [ ] Feature
- [ ] Task

###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/6254)
## 📖 Description
Force the vcpkg triplet platform to be lowercase for `ARM64`.
@pl4nty

Copy link
Copy Markdown
Member

Copilot fix the CI error

@pl4nty Tom Plant (pl4nty) force-pushed the copilot/add-logs-cmtrace-format branch from 80b592f to 046bef9 Compare June 8, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants