Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🩹 [Patch]: Add debug-logging #22

Merged
merged 23 commits into from
Jan 11, 2025
Merged

🩹 [Patch]: Add debug-logging #22

merged 23 commits into from
Jan 11, 2025

Conversation

MariusStorhaug
Copy link
Member

@MariusStorhaug MariusStorhaug commented Jan 11, 2025

Description

This pull request includes several enhancements to the PowerShell scripts to improve logging, error handling, and overall structure. The most important changes are the addition of begin, process, and end blocks, improved error handling, and enhanced logging for better debugging.

Enhancements to logging and structure:

  • scripts/main.ps1: Added begin, process, and end blocks to provide a clearer structure and added debug messages at the start and end of the script. [1] [2]
  • scripts/outputs.ps1: Added begin, process, and end blocks to provide a clearer structure and added debug messages at the start and end of the script. [1] [2]

Improvements to error handling:

  • scripts/main.ps1: Enhanced error handling by adding -ErrorAction Stop to the Install-PSResource command and logging warnings for exceptions.
  • scripts/main.ps1: Wrapped the main process block in a try block to catch and rethrow exceptions, ensuring any errors are properly handled and logged.
  • scripts/outputs.ps1: Wrapped the main process block in a try block to catch and rethrow exceptions, ensuring any errors are properly handled and logged.

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@MariusStorhaug MariusStorhaug changed the title Debugging 🩹 [Patch]: Add debug-logging Jan 11, 2025
@MariusStorhaug MariusStorhaug self-assigned this Jan 11, 2025
@MariusStorhaug MariusStorhaug merged commit 15b36d8 into main Jan 11, 2025
36 checks passed
@MariusStorhaug MariusStorhaug deleted the debugging branch January 11, 2025 20:57
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.

1 participant