You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using NHibernate with PostgreSQL via the Npgsql driver in our application. We are aiming to configure tracing options in Npgsql to control and eliminate specific logs emitted by Npgsql, particularly to improve our logging output and reduce noise.
The latest version of Npgsql introduces the ability to configure tracing options using the NpgsqlDataSourceBuilder API, as detailed in the Npgsql documentation:
Npgsql Tracing Documentation
However, I have encountered an issue where NHibernate's NpgsqlDriver does not seem to support configuring these tracing options. It appears that NHibernate uses NpgsqlConnection directly to create connections, without exposing a way to utilize NpgsqlDataSource or configure the tracing options.
My Questions:
Is there a way to configure Npgsql tracing options within NHibernate?
Can we extend or customize the NpgsqlDriver or ConnectionProvider to use NpgsqlDataSource and apply tracing configurations?
Are there plans to update NHibernate to support the latest Npgsql features, including the NpgsqlDataSource API?
The text was updated successfully, but these errors were encountered:
sgudapa
changed the title
ConfigureTracingOptions for npgsql when using Nhibernate
Support for Configuring Npgsql Tracing Options in NHibernate
Dec 3, 2024
DbDataSource is a very new concept and it's not necessarily a good fit for NHibernate (support is slim in EF too), so it's unfortunate that tracing options can only be configured that way. That said, it would certainly be possible to create a custom driver which uses NpgsqlDataSource.
I am using NHibernate with PostgreSQL via the Npgsql driver in our application. We are aiming to configure tracing options in Npgsql to control and eliminate specific logs emitted by Npgsql, particularly to improve our logging output and reduce noise.
The latest version of Npgsql introduces the ability to configure tracing options using the NpgsqlDataSourceBuilder API, as detailed in the Npgsql documentation:
Npgsql Tracing Documentation
However, I have encountered an issue where NHibernate's NpgsqlDriver does not seem to support configuring these tracing options. It appears that NHibernate uses NpgsqlConnection directly to create connections, without exposing a way to utilize NpgsqlDataSource or configure the tracing options.
My Questions:
The text was updated successfully, but these errors were encountered: