Skip to content

Passing a log-config file fails with AttributeError #23

@gerritholl

Description

@gerritholl

Code Sample, a minimal, complete, and verifiable piece of code

aapp_dr_runner.py -v -c aapp-processing.yaml -n localhost -e test --log-config logging.yaml

Problem description

Starting the runner passing a logfile with --log-config fails with AttributeError: module 'logging' has no attribute 'config'.

Expected Output

I expect that aapp-runner applies the desired config.

Actual Result, Traceback if applicable

$ aapp_dr_runner.py -v -c aapp-processing.yaml -n localhost -e test --log-config logging.yaml
Warning: given station: unknown not in supported_stations list.
Variable tle_download is not recognised as a mandatory nor optional config variable.This will not be used in the processing.
Checking directories...
Traceback (most recent call last):
  File "/opt/pytroll/pytroll_inst/miniconda3/envs/pytroll-py39/bin/aapp_dr_runner.py", line 1057, in <module>
    setup_logging_from_config(log_config)
  File "/opt/pytroll/pytroll_inst/miniconda3/envs/pytroll-py39/bin/aapp_dr_runner.py", line 391, in setup_logging_from_config
    logging.config.dictConfig(log_dict)
AttributeError: module 'logging' has no attribute 'config'

Versions of Python, package at hand and relevant dependencies

Python 3.9.2, aapp-runner latest main branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions