Skip to content

Conversation

@HappyAmazonian
Copy link
Contributor

  • Implement centralized logging configuration that defaults to ERROR level
  • Use existing SAGEMAKER_CONTAINER_LOG_LEVEL (or LOG_LEVEL) environment variables
  • Migrate all 13 files to use centralized logger from logging_config
  • Add comprehensive unit tests for logging configuration
  • Update README with logging control documentation

By default, package logging is effectively silent (ERROR level) unless explicitly configured via environment variables. This keeps production environments clean while allowing easy debugging when needed.

Files migrated to centralized logger:

  • sagemaker/sagemaker_router.py
  • common/custom_code_ref_resolver/module_loader.py
  • common/fastapi/routing.py
  • common/custom_code_ref_resolver/file_loader.py
  • common/custom_code_ref_resolver/function_loader.py
  • sagemaker/sessions/transform.py
  • sagemaker/sessions/utils.py
  • sagemaker/sessions/handlers.py
  • common/transforms/base_factory.py
  • sagemaker/lora/transforms/init.py
  • sagemaker/lora/factory.py
  • common/handler/resolver.py
  • sagemaker/handler_resolver.py

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

…EVEL

- Implement centralized logging configuration that defaults to ERROR level
- Use existing SAGEMAKER_CONTAINER_LOG_LEVEL (or LOG_LEVEL) environment variables
- Migrate all 13 files to use centralized logger from logging_config
- Add comprehensive unit tests for logging configuration
- Update README with logging control documentation

By default, package logging is effectively silent (ERROR level) unless
explicitly configured via environment variables. This keeps production
environments clean while allowing easy debugging when needed.

Files migrated to centralized logger:
- sagemaker/sagemaker_router.py
- common/custom_code_ref_resolver/module_loader.py
- common/fastapi/routing.py
- common/custom_code_ref_resolver/file_loader.py
- common/custom_code_ref_resolver/function_loader.py
- sagemaker/sessions/transform.py
- sagemaker/sessions/utils.py
- sagemaker/sessions/handlers.py
- common/transforms/base_factory.py
- sagemaker/lora/transforms/__init__.py
- sagemaker/lora/factory.py
- common/handler/resolver.py
- sagemaker/handler_resolver.py
@HappyAmazonian HappyAmazonian merged commit 11cb2b1 into aws:main Nov 18, 2025
4 checks passed
@HappyAmazonian HappyAmazonian deleted the log-suppression branch November 18, 2025 19:38
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