Skip to content

Extended debug logging #1729

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

Merged
merged 54 commits into from
Jul 16, 2025
Merged

Conversation

spetersenms
Copy link
Contributor

No description provided.

@spetersenms
Copy link
Contributor Author

Leaving this is draft state until I come back from vacation.

@spetersenms spetersenms marked this pull request as ready for review June 18, 2025 13:20
@Copilot Copilot AI review requested due to automatic review settings June 18, 2025 13:20
@spetersenms spetersenms requested a review from a team as a code owner June 18, 2025 13:20
Copilot

This comment was marked as outdated.

@spetersenms spetersenms requested review from mazhelez, Copilot and aholstrup1 and removed request for Copilot July 14, 2025 09:12
Copilot

This comment was marked as outdated.

aholstrup1
aholstrup1 previously approved these changes Jul 15, 2025
Copy link
Collaborator

@aholstrup1 aholstrup1 left a comment

Choose a reason for hiding this comment

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

LGTM! The extended debug logging improvements look good and will help with troubleshooting AL-Go workflows. The changes appear well-structured and maintain backward compatibility.

Copy link
Collaborator

@mazhelez mazhelez left a comment

Choose a reason for hiding this comment

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

One more iteration is needed perhaps.

Release notes are currently missing.

@mazhelez mazhelez requested a review from Copilot July 15, 2025 13:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds extended debug logging support by introducing a shared DebugLogHelper module, wiring it into existing scripts, and updating documentation.

  • Introduce DebugLogHelper.psm1 with reusable logging functions
  • Update various dev environment and action scripts to download/import the new module
  • Remove inline logging functions from AL-Go-Helper.ps1 and note the change in RELEASENOTES.md

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Tests/TestActionsHelper.psm1 Import DebugLogHelper for test helper functions
Templates/Per Tenant Extension/.AL-Go/localDevEnv.ps1 Download & import DebugLogHelper
Templates/Per Tenant Extension/.AL-Go/cloudDevEnv.ps1 Download & import DebugLogHelper
Templates/AppSource App/.AL-Go/localDevEnv.ps1 Download & import DebugLogHelper
Templates/AppSource App/.AL-Go/cloudDevEnv.ps1 Download & import DebugLogHelper
RELEASENOTES.md Add section about extended debug logging
Actions/Invoke-AlGoAction.ps1 Import DebugLogHelper
Actions/DetermineDeploymentEnvironments/DetermineDeploymentEnvironments.ps1 Add OutputDebugFunctionCall and OutputDebug calls
Actions/AL-Go-Helper.ps1 Import DebugLogHelper and remove legacy logging code
Actions/.Modules/DebugLogHelper.psm1 New module defining debug/logging helper functions
Comments suppressed due to low confidence (3)

Templates/Per Tenant Extension/.AL-Go/localDevEnv.ps1:60

  • [nitpick] Variable naming is inconsistent with other path variables ($GitHubHelperPath, $ReadSettingsModule); consider renaming $debugLoggingModule to $DebugLoggingModule for consistency.
$debugLoggingModule = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/main/.Modules/DebugLogHelper.psm1' -folder $tmpFolder

Actions/.Modules/DebugLogHelper.psm1:2

  • New debug helper functions (OutputDebugFunctionCall, OutputGroupStart, etc.) are introduced here but there are no unit tests covering them; consider adding tests to validate their behavior.
if ($env:GITHUB_ACTIONS -eq "true") {

Actions/.Modules/DebugLogHelper.psm1:217

  • The module attempts to export a variable debugLoggingEnabled, but this variable is never defined; either declare and initialize debugLoggingEnabled or remove it from Export-ModuleMember.
Export-ModuleMember -Function OutputColor, OutputDebugFunctionCall, OutputGroupStart, OutputGroupEnd, OutputError, OutputWarning, OutputNotice, MaskValueInLog, OutputDebug

@spetersenms spetersenms merged commit 0e080a3 into microsoft:main Jul 16, 2025
5 checks passed
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.

3 participants