duneanalytics / dune-client

A framework for interacting with Dune Analytics' officially supported API service
Apache License 2.0
85 stars 22 forks source link

Fix Logging Configuration #13

Closed bh2smith closed 2 years ago

bh2smith commented 2 years ago

Recently realized that project depending on this package which do not have their own logging.conf file will run into errors due to lack of existence of this file. So we went with a more basic configuration. For example, see this demo repo.

  File "/Users/bh2smith/Projects/bh2smith/dunecon-workshop/venv/lib/python3.10/site-packages/dune_client/client.py", line 28, in <module>
    logging.config.fileConfig(fname="logging.conf", disable_existing_loggers=False)
  File "/opt/homebrew/Cellar/python@3.10/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/logging/config.py", line 72, in fileConfig
    formatters = _create_formatters(cp)
  File "/opt/homebrew/Cellar/python@3.10/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/logging/config.py", line 105, in _create_formatters
    flist = cp["formatters"]["keys"]
  File "/opt/homebrew/Cellar/python@3.10/3.10.6_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/configparser.py", line 964, in __getitem__
    raise KeyError(key)
KeyError: 'formatters'

Test Plan

CI (No logical changes)

bh2smith commented 2 years ago

Merging without approval because no logical changes. Still open to alternate log configuration suggestions.