NHibernate typically use log4net for logging, so this question is really
about what configuration abilities log4net provides. I recommend to study
their documentation. There is various filtering features. And it's
extensible so as the last resort you should be able to code something.

That being said, I wasn't aware that NH outputs SQL under the "NHibernate"
logger. I get SQL as:
INFO  NHibernate.Loader.Loader
DEBUG NHibernate.SQL

If this is true for you too, perhaps you could modify the level of just the
"NHibernate.Loader.Loader" logger.

/Oskar




2013/10/14 <[email protected]>

> Hello
>
> We would like to log nhibernate queries with parameter values but the
> "nhibernate" log doesn't do it, at least it just logs the queries with the
> parameters but not the value of the parameters, which makes the log
> useless. The "nhibernate.sql" logs the queries with the value of the
> parameters, which is what we want but we don't want to log the queries
> twice, once in the "nhibernate" and once in the "nhibernate.sql", the
> generated log files are already big, we don't want to make them bigger by
> logging double and useless information.
>
> The only solution that we have found is to set the level of the
> "nhibernate" logger to "warn" and the level of the "nhibernate.sql" to
> "debug". Is that the only solution?
> Is it possible to set level of the "nhibernate" logger to "info" and don't
> log the aqueries or to log the queries with the value of the parameters?
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/nhusers.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to