Fetching pre/post hook outputs for better logging.

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.