mapillary / mapillary/OpenSfM

enable configuring logging using logging ini

Open
#994 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.8k
Forks
899
PR merge metrics
No merged PRs in 30d

Description

https://github.com/mapillary/OpenSfM/blob/b760b21f5d23a2872e89fc708ac44645623e605a/opensfm/log.py#L6

add a capability to configure logging using ini and environment var
for example:

def setup() -> None:
    logging_conf_file = os.environ.get("OPENSFM_LOGGING_CONF")
    logging_level = os.environ.get("OPENSFM_LOG_LEVEL", "DEBUG")
    logging.basicConfig(level=logging_level)
    if logging_conf_file:
        logging.config.fileConfig(__logging_conf_file)
    else:
        logging.basicConfig(
            format="%(asctime)s %(levelname)s: %(message)s", level=logging.DEBUG
        )

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the setup() implementation in opensfm/log.py at the linked location. Trace how logging is currently initialized, then verify how OPENSFM_LOGGING_CONF and OPENSFM_LOG_LEVEL should affect configuration. Done means both environment variables are supported without changing the default logging behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.