dbt-labs / dbt-common

Apache License 2.0
13 stars 15 forks source link

Provide method for adding `Callback` handlers to global `_EVENT_MANAGER` #131

Closed QMalcolm closed 6 months ago

QMalcolm commented 6 months ago

Housekeeping

Short description

Currently we have a method to add a logger to the global _EVENT_MANAGER, called add_logger_to_manager. Although it happens less frequently sometimes people want to add callback handlers to the event manager. This is happening more and more in the unit tests for dbt-core, which although is just a testing usecase, is still relevant. As such we should provide a method for doing so.

Acceptance criteria

A method exists for adding callback handlers to the global event manager

Suggested Tests

Impact to Other Teams

N/A

Will backports be required?

No

Context

No response