apache / apache/beam

Attach Python logging messages to namespaced logger

Open
#18,626 0 comments 0 reactions 0 assignees View on GitHub
core improvement P3 python
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
205

Description

The python SDK currently uses `logging.(info|error|debug|etc)` for log messages. This can be disruptive or unexpected when integrating the SDK into existing applications.

I would like to request updating the SDK to enforce automatic module based namespaces in python code (i.e. `logger = logging.getLogger(__name__)`) so that all `apache_beam` output can be controlled by an integrating application without the need to modify the root logging configuration.

I'd be happy to submit a PR for this myself.

Imported from Jira [BEAM-3523](https://issues.apache.org/jira/browse/BEAM-3523). Original Jira may contain additional context.
Reported by: amilstead.

Contributor guide

Open the contributing guide

Research direction

Locate the Python SDK code that currently calls logging.info, logging.error, logging.debug, and related functions; no specific files or tests are named in the issue. Determine the scope of those calls and verify that Apache Beam output can be controlled through module-based logger names without changing an application's root logging configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
observability-sre
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.