End of SQL Statement indicator in LINQ Logging
Posted: Thu 01 Jul 2010 08:42
Hello,
It is apparent that a single SQL query/statement is not passed to the Log object in one method call but the DataContext class usually calls the WriteLine method multiple times. This is a major problem for logging/tracing tools because there is not a proper end-of-statement indicator that would help in buffering all the lines of a single SQL statement and properly flushing it.
Some commercial logging tools like Gurock's SmartInspect which is the one i use, depend on the last "Context" line provided by the Microsoft implementation in order to mark the end of statement. Nevetheless, such an indicator is not present in the Devart implementation and there is no way for someone who writes a logging tool to properly acknowledge where a single SQL statement starts and finishes unless he writes a complete SQL parser which of course is unacceptable.
It would be nice if Devart could provide the same end of line entry like the Microsoft implementation for the sake of better compatibility.
It is apparent that a single SQL query/statement is not passed to the Log object in one method call but the DataContext class usually calls the WriteLine method multiple times. This is a major problem for logging/tracing tools because there is not a proper end-of-statement indicator that would help in buffering all the lines of a single SQL statement and properly flushing it.
Some commercial logging tools like Gurock's SmartInspect which is the one i use, depend on the last "Context" line provided by the Microsoft implementation in order to mark the end of statement. Nevetheless, such an indicator is not present in the Devart implementation and there is no way for someone who writes a logging tool to properly acknowledge where a single SQL statement starts and finishes unless he writes a complete SQL parser which of course is unacceptable.
It would be nice if Devart could provide the same end of line entry like the Microsoft implementation for the sake of better compatibility.