Skip to content

Feature/log to multiple destinations#926

Closed
KnifMelti wants to merge 63 commits into
Romanitho:developfrom
KnifMelti:feature/Log_to_multiple_destinations
Closed

Feature/log to multiple destinations#926
KnifMelti wants to merge 63 commits into
Romanitho:developfrom
KnifMelti:feature/Log_to_multiple_destinations

Conversation

@KnifMelti

@KnifMelti KnifMelti commented Apr 26, 2025

Copy link
Copy Markdown
Collaborator

Proposed Changes

WinGet-Install now handles all relevant mods:
$ModsPreInstall, $ModsOverride, $ModsCustom, $ModsInstall, $ModsInstalled
$ModsPreUninstall, $ModsUninstall, $ModsUninstalled

Now possible to skip install/update/uninstall from $ModsPreInstall/$ModsPreUnInstall if it has: return $false (check if App is running, etc...)

Log system extended:
1: Standard log file as it is +
2: Configuration Manager log file (if CMTrace.exe or CMLogViewer.exe exists) +
3: Windows Event Log

Related Issues

Fixes #810, Fixes #925

@KnifMelti

KnifMelti commented Apr 26, 2025

Copy link
Copy Markdown
Collaborator Author

@Romanitho
Megalinter: Warning PSUseBOMForUnicodeEncodedFile Write-ToLog.ps1 Missing BOM encoding for non-ASCII encoded file 'Write-ToLog.ps1'

Im using $Log | Out-File -FilePath $StandardLogFile -Append -Encoding Unicode
If I don't do that the Standard log file is kind of "garbled" from the WinGet output:

image

image

@KnifMelti
KnifMelti marked this pull request as draft April 26, 2025 11:40
@Romanitho

Copy link
Copy Markdown
Owner

I think this is the ps1 file that is not utf8 bom

@KnifMelti

Copy link
Copy Markdown
Collaborator Author

No other ps1 file is either, but no complains for them...

@KnifMelti
KnifMelti marked this pull request as ready for review April 26, 2025 12:10
@KnifMelti

Copy link
Copy Markdown
Collaborator Author

Example:
image

image

@KnifMelti
KnifMelti marked this pull request as draft April 26, 2025 13:51
@KnifMelti

Copy link
Copy Markdown
Collaborator Author

This is a big chunk of work. I'd prefer to have each change in its own dedicated PR 😅

Yes, I know...
...but I was in a flow, and one change led to another change and all suddenly it became clear that I was rewriting nearly everything.
But it's only 10 files, and it even got a simplifying in it: 4ca0710 - (you like?)

@KnifMelti
KnifMelti marked this pull request as draft May 12, 2025 15:26
@KnifMelti

KnifMelti commented May 12, 2025

Copy link
Copy Markdown
Collaborator Author

Something happend when I merged main into this...

@KnifMelti
KnifMelti marked this pull request as ready for review May 12, 2025 15:34
@KnifMelti

Copy link
Copy Markdown
Collaborator Author

Something happend when I merged main into this...

Nah, I was wrong!
Actually it's only 6 files (the rest is mods and docu...)

@KnifMelti

Copy link
Copy Markdown
Collaborator Author

Will extract the WinGet-Install and Mods changes from this PR and create a new separate for #810

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.

2 participants