Add centralized logging module for Scuba Runs#1970
Conversation
|
Starting my review. |
|
Couple of comments regarding the privacy of the information captured. The original intent of #1326 is captured in the screenshot below for context:
So if we want to capture information that a user that is having problems can upload to the ScubaGear team, we have some options to offer the user:
User might not feel comfortable sharing the type of data captured below, especially if they planned to upload to the public repo: We can talk through this at a next parking lot. |
|
@DickTracyII The lion's share of the Transcript file is an iterative list of import statements. Do you think we will use this? It makes it difficult to scroll through the file.
I ran the DebugScuba mode a couple of times again after my initial run and the Transcript file is much smaller, without the import cmdlet detailed messages. When does your code write those imports versus when it does not? |
@DickTracyII Can we redact content like "Username" and "RunAs User"? We should comb through the transcript file for any other sensitive data that's output as well. |
|
One thing I found pretty cool was that in the AAD transcript you can see it calling the Graph batch endpoint with full details of the request. |














Description
This PR introduces a new module,
ScubaLogging.psm1, and integrates it intoOrchestrator.psm1to provide centralized logging for Scuba runs. Logging is handled in one place, avoiding the need to modify individual provider or support modules.Key behaviors:
M365BaselineConformance_<date>\DebugLogsfolder.Start-Transcriptto capture execution output.Changes are intentionally scoped to adding the logging module and wiring it into the orchestrator.
Motivation / Context
Troubleshooting Scuba runs can be difficult without a single, complete log capturing command output and runtime flow. Previous approaches would require inserting logging across many modules, which increases maintenance and risk.
This change centralizes logging so:
Closes: #1326
Testing
-DebugScubaparameter and verified a transcript/log file is written to theM365BaselineConformance_<date>\DebugLogsfolder.Screenshots
Pre-approval checklist
Pre-merge checklist
Post-merge checklist