Intercept SQL statements containing parameter values generated by NHibernate

后端 未结 4 1104
被撕碎了的回忆
被撕碎了的回忆 2020-12-05 07:30

I use a simple interceptor to intercept the sql string that nhibernate generates for loging purposes and it works fine.

public class SessionManagerSQLInterce         


        
4条回答
  •  被撕碎了的回忆
    2020-12-05 08:14

    Just an idea: can you implement a new log4net-appender, which takes all sqlstatements(debug with parameter) and holds the last one. When an error occured you can ask him for the last sqlstatement and email it.

提交回复
热议问题