Skip to content

Add logging for QueryBatch similar to Loader.DoQuery #2304

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

Merged
merged 1 commit into from
Jan 14, 2020

Conversation

bahusoid
Copy link
Member

@bahusoid bahusoid commented Jan 13, 2020

Fixes #2296
Added logging from Loader.DoQuery to QueryBatch

We might also fix this one in 5.2.

It's not exactly a regression as debug logging is not a public API. And this logging is not present for criteria MultiCriteriaImpl but only in MultiQueryImpl.
But I agree logging for List() and for Future().List() should be the same if possible.
And this logging is missing for hql Future queries in 5.2 - so might be considered as regression.

What do you think?

@@ -16,6 +16,8 @@ namespace NHibernate.Multi
/// </summary>
public abstract partial class QueryBatchItemBase<TResult> : IQueryBatchItem<TResult>, IQueryBatchItemWithAsyncProcessResults
{
private static readonly INHibernateLogger Log = NHibernateLogger.For(typeof(QueryBatch));
Copy link
Member Author

Choose a reason for hiding this comment

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

QueryBatch type here is intentional.. Don't want to create separate logger for each result type

Copy link
Member

@fredericDelaporte fredericDelaporte left a comment

Choose a reason for hiding this comment

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

Ok for 5.2.x if you rather have it there.

If you re-target, also regen async again in case there is some discrepancy due to the async generator not being the same.

@fredericDelaporte
Copy link
Member

Rebased (and squashed) to have the Travis fix commit in this PR branch.

@fredericDelaporte fredericDelaporte merged commit 6784416 into nhibernate:5.2.x Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants