Add setting for logs to use CCM format#1
Conversation
Agent-Logs-Url: https://github.com/devicie/winget-cli/sessions/c4d184c0-b0f2-46bc-9e42-e68d558e7f8a Co-authored-by: pl4nty <21111317+pl4nty@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Tom Plant (pl4nty)
left a comment
There was a problem hiding this comment.
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
…d build workflow Agent-Logs-Url: https://github.com/devicie/winget-cli/sessions/7d39e80e-abcc-4238-8301-b2a0f059dcaf Co-authored-by: pl4nty <21111317+pl4nty@users.noreply.github.com>
check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.Unrecognized words (1)fff These words are not needed and should be removedAAD ABCD abi ACL'd AMap Amd appdata ARMNT asan Baz bitmask bluetooth boundparms brk Buf certs cgi CMSG codepage commandline constexpr Cov cswinrt CTL Dbg Dcom decompressor dedupe DEFT devhome Dns dsc ERANGE errcode errmsg errstr filemode Finalizers FULLWIDTH fuzzer GES github Hackathon HINSTANCE hlocal hmac Hyperlink ICONDIR icu idx img inet Intelli iwr JDK LCID lhs LONGLONG LPBYTE LPCWSTR LPDWORD LPSTR LPVOID LPWSTR MAJORVERSION MAXLENGTH maxvalue MDs MINORVERSION mta nlohmann NONAME NOUPDATE NTFS ofile oid oop OPTOUT outfile OUTOFMEMORY PARAMETERMAP pdb PDWORD pid PKCS pkix placeholders positionals posix pscustomobject pseudocode PSHOST publickey qword redirector regexes remoting reparse REQS rhs rowid RTTI runspace runtimes SARL savepoint Scm sid sqlite subdir subkey trimstart ttl typedef uninitialize uninstallation UNMARSHALING userprofile versioned Webserver website wildcards winreg WMI workaround Wpp wslTo accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands... in a clone of the git@github.com:devicie/winget-cli.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.26/apply.pl' |
perl - 'https://github.com/devicie/winget-cli/actions/runs/25955791184/attempts/1' &&
git commit -m 'Update check-spelling metadata'Pattern suggestions ✂️ (2)You could add these patterns to Alternatively, if a pattern suggestion doesn't make sense for this project, add a Notices ℹ️ (1)See the 📂 files view, the 📜action log, or 📝 job summary for details.
See ℹ️ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
Done in commit
|
📖 Description
Adds a
logging.formatenum 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 theFileLogger.When
"CCM"is selected, log entries are written in the format recognized by CMTrace and Microsoft Endpoint Configuration Manager log viewers:Key changes:
LogFileFormatenum (WinGet,CCM) toAppInstallerLogging.hLoggingUseCMTracebool withLoggingFormatin theSettingenum, mapped to.logging.formatToCCMLogLine()helper inFileLogger.cpp;FileLogger::Write()dispatches to it whenlogging.formatis"CCM".github/workflows/build-msix.yml— builds an x64 Release MSIX on pushes tocopilot/**branches, PRs, and manual dispatch, uploading the package as a GitHub Actions artifactExample
settings.json:{ "logging": { "format": "CCM" } }🔗 References
🔍 Validation
Unit tests added under
SettingLoggingFormatinAppInstallerCLITestscovering:WinGet"winget"and"CCM"values parse correctly"CCM"and"ccm"both work)"cmtrace") produces a warning and falls back to default✅ Checklist
📋 Issue Type
Original prompt
Created from VS Code.