# Fetching pre/post hook outputs for better logging.

**URL:** <https://discourse.getdbt.com/t/fetching-pre-post-hook-outputs-for-better-logging/18868>\
**Category:** Help\
**Tags:** jinja, testing, dbt-core\
**Created:** [March 31, 2025, 10:03am UTC](https://discourse.getdbt.com/t/fetching-pre-post-hook-outputs-for-better-logging/18868 "2025-03-31T10:03:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![t1r3sh](https://avatars.discourse-cdn.com/v4/letter/t/8797f3/32.png) [@t1r3sh](https://discourse.getdbt.com/u/t1r3sh)\
**Post date:** [March 31, 2025, 10:03am UTC](https://discourse.getdbt.com/t/fetching-pre-post-hook-outputs-for-better-logging/18868/1 "2025-03-31T10:03:56Z")

</div>

I am in the middle of a large-scale migration from a legacy tool to an airflow + dbt combo. I’ve created several packages, which I use to prepare and post-process some of the models. For debugging reasons, I used a lot of dbms\_output inside. While local testing lets me fully observe what is happening inside my stored procedures, when they run by airflow, I cannot see anything.  
Is there any way of accumulating outputs and then printing them, for example, using log macros?

I use Cosmos for airflow dbt integration. DBt is run at Oracle 19. I suppose that dbms\_output.enable has something to do with this.

Unfortunately, I ran through the dbt docs and didn’t find anything helpful. But I hope that this is still possible.

Thank everyone for your help in advance.
