How to Log All the queries with their parameter values
43 views
Skip to first unread message
Roshan Budhathoki
unread,
Dec 28, 2023, 2:36:29 PM12/28/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to nhusers
I could log queries using Interceptor but paramerters are not being logged.
-------
public class NhibernateQueryLogger : EmptyInterceptor { private Logger _logger; public NhibernateQueryLogger() { _logger = new LoggerConfiguration().WriteTo.RollingFile("logs/nhibernate-log-{Date}.txt").CreateLogger(); }