Skip to content

Conversation

@cmaynard-ngwpc
Copy link

@cmaynard-ngwpc cmaynard-ngwpc commented Sep 19, 2025

While testing Sac-SMA standalone, a run-time error occurred due to a recursive call to write_log. When write_log starts, it call initialize, which calls set_log_file_path which calls write_log. Refactored to use print statements since these really were not necessary in the log file, thereby removing recursion.

Additions

  • Comments providing instructions on enabling the EWTS logger when running the module stand-alone.

Removals

  • Unnecessary string building code for the removed write_log statements during initialization.

Changes

  • Converted write_log statements while initializing the logger to print statements.

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

@cmaynard-ngwpc cmaynard-ngwpc force-pushed the cmaynard_NGWPC-8295_fix_logger_recursion branch from 27bba48 to eb39604 Compare September 19, 2025 23:11
@cmaynard-ngwpc cmaynard-ngwpc force-pushed the cmaynard_NGWPC-8295_fix_logger_recursion branch from aabd427 to eb39604 Compare September 22, 2025 18:36
@cmaynard-ngwpc cmaynard-ngwpc force-pushed the cmaynard_NGWPC-8295_fix_logger_recursion branch from 419e208 to 0788b3e Compare September 22, 2025 18:38
Copy link

@zhengtaocui zhengtaocui left a comment

Choose a reason for hiding this comment

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

Instructions for using loggers have been added. I approve this PR.

@cmaynard-ngwpc cmaynard-ngwpc merged commit 6def57e into release-candidate Sep 22, 2025
@cmaynard-ngwpc cmaynard-ngwpc deleted the cmaynard_NGWPC-8295_fix_logger_recursion branch September 22, 2025 18:51
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