This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Whats the easiest way to view the TSQL that lightspeed is generating during a debug session? I know there is a Visual Studio Debugger Visualizer - but I can't seem to get this to work (am using LINQ queries, not Query objects - is that why?) |
|
|
Set the Logger property on the LightSpeedContext. LightSpeed includes a TraceLogger which will log to your trace output (by default, the Visual Studio Output window). You're right that the debugger visualiser only works with Query objects. We'll take a look at getting that updated to work with LINQ queries -- thanks for pointing this out! |
|
|
"Set the Logger property on the LightSpeedContext" Set it to what exactly? I can't find any documentation on this... |
|
|
To an appropriate ILogger implementation -- e.g. new ConsoleLogger() or new TraceLogger(), or a custom implementation for your environment. See Help Topics > LightSpeed > Logging for (a bit) more info. |
|
|
Sorry - you're going to have to be more specific. The help file has one line about "Enabling Logging Programmatically" but nothing on setting it up in the config file.
Can you give me a sample config setting that would make this happen. Thanks.
|
|
|
Sorry - am confusing myself. I didn't realise you were talking about enabling logging on an individual LightSpeedContext. I thought you were talking about setting the 'loggerclass' attribute in the config file. I guess I am trying to see the output generated by all the LightSpeedContexts in my app during a debug session - I don't want to have to change my code to add one to each context.
I have tried adding the attribute loggerClass="Mindscape.LightSpeed.Logging.TraceLogger" in my config file - but this doesn't seem to do anything (no output visible in the Output window during a debug session).
Is there a way to do this?
|
|
|
Sorry, didn't realise you were asking about configuration. There's an example of setting up logging via config under Help Topics > LightSpeed > Configuration, but the quick answer is that you need to set loggerClass to the assembly-qualified type name, e.g.: <lightSpeedContexts> |
|
|
No, I'm afraid logging has to be set up separately on each context. Sorry. Re your config entry, I think it's because the type name needs to be assembly-qualified. Try: loggerClass="Mindscape.LightSpeed.Logging.TraceLogger, Mindscape.LightSpeed" (you might also need some of the strong-naming stuff in there e.g. PublicKeyToken=... but hopefully not!) |
|
|
[quote user="ivan"]You're right that the debugger visualiser only works with Query objects. We'll take a look at getting that updated to work with LINQ queries -- thanks for pointing this out![/quote]
Just curious if I am maybe doing something wrong, Visualizer is still not working on LINQ queries? |
|
|
You're not doing anything wrong -- we just haven't got round to doing this work yet. Do you need us to bump the priority on this? |
|
|
No need for higher priority. After months of usage, I was reviewing again LS documentation, so bumped into some "undiscovered" features like this. |
|