Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call sites in core/dbt (excluding main.py) #4202

Merged
merged 6 commits into from
Nov 4, 2021

Conversation

emmyoop
Copy link
Member

@emmyoop emmyoop commented Nov 3, 2021

Description

Modifying call sites for structured logging in core/dbt/deps excluding core/dbt/deps/main.py & logger.py

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change

@cla-bot cla-bot bot added the cla:yes label Nov 3, 2021
@emmyoop emmyoop changed the base branch from main to feature/structured-logging November 3, 2021 20:10
@emmyoop emmyoop marked this pull request as ready for review November 4, 2021 13:53
Copy link
Contributor

@nathaniel-may nathaniel-may left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor note

if log_fmt is not None:
msg = log_fmt.format(msg)
logger.warning(msg)
fire_event(GeneralWarning(msg=str(exc), log_fmt=log_fmt))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to pass the actual value here instead of its string rep if we can.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was passing in the string form to prevent circular imports. Had to move pluralize into the new format.py and fix all imports of pluralize from utils.py to point to format.py. While all the imports are not in /events, they are all for purposes of logging.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nice. Yeah if it's a big pain in the butt to not pass strings, it's not a hill I'll die on, but it looks like you got it work.

@emmyoop emmyoop merged commit d8777bd into feature/structured-logging Nov 4, 2021
@emmyoop emmyoop deleted the er/sl-core-dbt branch November 4, 2021 16:56
emmyoop added a commit that referenced this pull request Nov 8, 2021
* add struct logging to compilation

* add struct logging to tracking

* add struct logging to utils

* add struct logging to exceptions

* fixed some misc errors

* updated to send raw ex, removed resulting circ dep
emmyoop added a commit that referenced this pull request Nov 8, 2021
* add struct logging to compilation

* add struct logging to tracking

* add struct logging to utils

* add struct logging to exceptions

* fixed some misc errors

* updated to send raw ex, removed resulting circ dep
kwigley pushed a commit that referenced this pull request Nov 9, 2021
* add struct logging to compilation

* add struct logging to tracking

* add struct logging to utils

* add struct logging to exceptions

* fixed some misc errors

* updated to send raw ex, removed resulting circ dep
nathaniel-may pushed a commit that referenced this pull request Nov 9, 2021
* add struct logging to compilation

* add struct logging to tracking

* add struct logging to utils

* add struct logging to exceptions

* fixed some misc errors

* updated to send raw ex, removed resulting circ dep
iknox-fa pushed a commit that referenced this pull request Feb 8, 2022
* add struct logging to compilation

* add struct logging to tracking

* add struct logging to utils

* add struct logging to exceptions

* fixed some misc errors

* updated to send raw ex, removed resulting circ dep


automatic commit by git-black, original commits:
  d8b97c1
iknox-fa pushed a commit that referenced this pull request Feb 8, 2022
* add struct logging to compilation

* add struct logging to tracking

* add struct logging to utils

* add struct logging to exceptions

* fixed some misc errors

* updated to send raw ex, removed resulting circ dep


automatic commit by git-black, original commits:
  d8b97c1
  dfb24fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants